Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: gimble
« on: August 18, 2011, 01:47:20 PM »

Based on recent experimentation, SetGlobal(), IncrementGlobal(), and SetGlobalTimer() all force the character out of stealth.

Perhaps it's old news, but it surprised me.  Sample script code was as follows:
Quote
IF
  ActionListEmpty()
  !GlobalTimerNotExpired("TEST","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("TEST","LOCALS",THREE_ROUNDS)
END
Run that as your script, and then click on the stealth button until the character hides.  He will un-hide as soon as the timer expires.  Similar tests can be done with SetGlobal() and IncrementGlobal().

I was running a "try to hide" counter for the character, so that he could initially try frequently, and then try less frequently as he continued failing.

However, once the PC succeeded and hid, resetting the counter to zero forced the character out of hiding.  Experimentation revealed the cause as listed above.

My ultimate workaround was to have non-hidden PC characters reset the "try to hide" global variable per PC as appropriate if hidden.  Works OK.