• It's time to dig through Hive's model database and dust off some oldie but goldie models and enter Hive's Texturing Contest #31 : Repurposing! Click here to enter!
  • 🏆 Hive's 5th HD Modeling Contest: Creep Camp is now open! Click here to enter!

[Trigger] Quick Question About Variables

Level 19
Joined
Aug 16, 2007
Messages
874
Hello there! I've just got a quick question about variables. According to the Object Manager I'm using my variable "TempPoint" in 58 triggers. Is there any chance that this may glitch using the variable in alot of triggers? I mean, is there any chance that another trigger will overwrite another triggers TempPoint variable? Regardless it's an instant or timed-event trigger? Thanks. :)
 
Level 19
Joined
Aug 16, 2007
Messages
874
It should be fine, as long as the variable is being disposed at the end and assigned at the beginning of your trigger.

Thanks for the quick answer. :) Yeah, exactly what I thought. I assing my variable at the beginning at the trigger and destroys it at the end of the trigger. It's named TempPoint because it's a temporary variable. Just thought it may glitch by using it in alot of triggers. Thanks again, +rep.
 
Level 19
Joined
Aug 16, 2007
Messages
874
It depends whether or not all your uses of it are instantaneous, or have some kind of wait/timer associated with them.

Everything is instant and I don't use waits, cause that ruins the MUI capability. The only timers I use is...

  • Events
    • Time - Every 1.00 seconds of game time
...this event, and that should not affect the variables itself.
 
Top