Jump to content

remotly activated switch malfunctions


M3rvin

Recommended Posts

I have a problem with an switch. It has a complex script attached but that's not the problem.

 

When I activate the switch in game (like a light switch f.ex.) the menu message pops up, I chose an option (f.ex. "Help") and the corresponding part of the script runs (the help message pops up).

But when try to activate the switch remotely, it won't work. The menu pops up, but then nothing happens. It seems that GetButtonPressed doesn't work correctly and that it sets the variable button to -1.

 

The switch is remotely activated by a .activate player 1 command in the OnFire Block of a weapon.

Link to comment
Share on other sites

The gamemode portion of the script probably won't run on the remote switch. Just the On Activate block. Maybe you could put the gamemode portion in a quest script that is fired off by the activation block.
Link to comment
Share on other sites

If the switch isn't in the cell with the player using the weapon, and the switch is not a persistent reference, then the script on it will not run properly. So try setting the switch as a persistent ref and see if that helps. Otherwise, you'll need to do what was stated earlier, and set it all in a quest script.

 

It is also my experience that the Button == -1 thing is not really required, so long as you add your exit button as an else instead of an elseif (making it the new default action if nothing was selected).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...