Staredit Network

Staredit Network -> UMS Assistance -> Question : Switch & Preserve Trigger
Report, edit, etc...Posted by hata711 on 2005-01-23 at 05:54:50
If there are two triggers.
Do i need preserve triggers for both triggers when there is a switch connected.
Or i only need to preserve trigger for the 1st trigger which has switch "set" in action.
And i can leave my 2nd trigger without preserve trigger which has switch "clear" in action.

It means, switch helps me connected both triggers and both triggers will always happen while 1st trigger has fired.
Report, edit, etc...Posted by AqoTrooper on 2005-01-23 at 07:03:52
basicly - if the switch is 'set' and that's the only requirement in both of your triggers then if you preserve them they'll keep firing till the switch get cleared, but if they're not preserved they'll just fire once when the switch will become set and won't fire anymore no matter whan happens to the switch.
Report, edit, etc...Posted by Blu on 2005-01-23 at 09:54:24
Actually, it depends on the map maker.

If you only want the switch to fire once, then dont use a preserve.
(This is useful for stories, or RPG's)

If you want the switch to fire every time the player completes the needs of the trigger, then use a preserve.
Such as:
  • Trigger
  • Players
    What ever player you want the trigger to work for.
  • Conditions
    Bring any unit to This Location
  • Actions
    Kill that unit at This Location
    Set Switch 1
    PreserveTrigger
  • Trigger
  • Players
    Same players as before
  • Conditions
    Switch 1 is set
  • Actions
    Display Text: "A zergling ate you"
    Defeat for current player
    Clear Switch 1
Report, edit, etc...Posted by DT_Battlekruser on 2005-01-23 at 12:09:20
Triggers that both happens to have actions with the same switch are not related in any way. If you want them both preserved, you have to add the PreserveTrigger(); action to both triggers.

Blu> He was asking if a trigger to set switch 1 is preserved will another trigger to clear it automatically be preserved (I think).
Report, edit, etc...Posted by terrenblade on 2005-01-23 at 17:59:03
let me put this as in simple language.

If you want a trigger to run more then one time EVER, you need to preserve it.
Next Page (1)