You can check the state of the switch using GetCurrentState[Agent]
or GetCurrentState[]
. As mentioned in the comment above, Verse uses the <decides>
effect rather than just returning a logic
value. This is a bit different than what is common in most languages, but is consistent with how Verse is designed to work. The example code above shows how to test the return fail
or succeed
when using GetCurrentState
.
Regarding GetCurrentState[Agent]
, if your switch device parameter Store State Per Player
is set to Yes
, then you can check the switch state per Agent
. If that parameter is set to No
then the state is tracked globally and not per Agent
. In both cases, it still checks the on
/off
state of the switch and not whether there is a state associated with a given Agent
.