Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] I need help with plague trigger.

Discussion in 'Triggers & Scripts' started by killer1390, Aug 17, 2009.

  1. killer1390

    killer1390

    Joined:
    Mar 19, 2008
    Messages:
    90
    Resources:
    0
    Resources:
    0
    :eekani:I need help. I am trying to make a trigger that damages all units except structures every x amount of seconds. For testing purposes x = 2.
    Here is what I have so far.

    • Plague
      • Events
        • Time - Every 2.00 seconds of game time
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Plague_sequence Less than 8
          • Then - Actions
            • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A structure) Equal to False)) and do (Actions)
              • Loop - Actions
                • Unit - Set life of (Picked unit) to ((Percentage life of (Picked unit)) x 0.88)%
            • Set Plague_sequence = (Plague_sequence + 1)
          • Else - Actions
            • Countdown Timer - Start Timer_event as a One-shot timer that will expire in 150.00 seconds
            • Countdown Timer - Create a timer window for (Last started timer) with title Next event:
            • Set Timer_event_window = (Last created timer window)
            • Set Plague_sequence = 0
            • Trigger - Turn off (This trigger)


    But all things in the map are damaged:cry:. Can anyone help me?:ugly:
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,174
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    Matching unit is a structure.
     
  3. DarkAngelAzazel

    DarkAngelAzazel

    Joined:
    Sep 14, 2008
    Messages:
    1,308
    Resources:
    0
    Resources:
    0
    1. "matching" unit. In matching conditions always use matching unit
    2. Why don't you just use "death and decay" change target to no buildings, damage to 12% and make a dummy cast it?
     
  4. killer1390

    killer1390

    Joined:
    Mar 19, 2008
    Messages:
    90
    Resources:
    0
    Resources:
    0
    Thank you both for reply. I will definitely use this. The death and decay idea is an interesting idea. I might use it. +rep for both.
     
    Last edited: Aug 17, 2009