Tracking individual units for periodic actions

Azrooh

New Member
Reaction score
5
I'm trying to achieve this:
A unit is infected. During this period, he's infectious. After a certain amount of time, he starts taking damage. I can't figure out how to individually pick a unit after a certain amount of time's elapsed - I'm using USMWE and EGUI with Newgen, if that helps.

These are the triggers I'm using now, and they don't quite work. Would I be able to modify these to get what I'm asking?

Trigger:
  • The Plague
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in PlagueGroup and do (Actions)
        • Loop - Actions
          • Region - Center PlagueIncubationRegion <gen> on (Position of (Picked unit))


Trigger:
  • Plague Catching
    • Events
      • Unit - A unit enters PlagueIncubationRegion <gen>
    • Conditions
      • (PlagueIncubationRegion <gen> contains (Triggering unit)) Equal to True
      • ((Triggering unit) is A structure) Not equal to True
    • Actions
      • Unit Group - Add (Entering unit) to PlagueGroup
      • Start PlagueTimer[(Custom value of (Entering unit))] lasting 10.00 and One-shot and execute (Unit Group - Add (Entering unit) to PlagueDamageGroup) when it expires


Trigger:
  • Plague Infected
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in PlagueDamageGroup and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Picked unit) from PlagueGroup
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 4.00)
          • Unit Group - To PlagueGroup add units near (Position of (Picked unit)) in a range of 250.00 matching (((Triggering unit) is A structure) Not equal to True)



E: For the array, I was using a max (8192, I think) array variable and assigning it to the custom value of the unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top