| 12-05-2003, 12:28 AM | #1 |
What I want the trigger to do is check a region for any units of a particular type and then act accordingly. If the supply units are there, then they lose 1 mana every 5 seconds and if they reach 0 mana, they are removed from game. There are other parts to the trigger but they work just fine, and I've tried a variety of ways of setting it up. Here's how it is now. Event: Time - Every 5.00 seconds of game time. Action: If (All Conditions are true) then do (then actions) else do (else actions) --Condition: (<region> contains (random unit from (units of type <supply-unit>))) equal to true --Then Actions: - Unit - (Set mana of random unit from (units in <region> matching (((Matching unit) is Mechanical) Equal to true))) to ((Mana of (Matching Unit) - 1)) - Unit Group - Pick every unit in (units in <region> matching (((matching unit) is mechanical) equal to true)) and do (If mana of picked unit equal to 0.00) then (remove (picked unit) from game) else (do nothing) The way it is now, after 5 seconds, the unit's mana goes straight to 0...://// LD |
| 12-05-2003, 03:41 AM | #2 |
Try this instead (change in bold) Unit - (Set mana of random unit from (units in <region> matching (((Matching unit) is Mechanical) Equal to true))) to ((Mana of (picked unit ) - 1)) |
| 12-05-2003, 04:32 AM | #3 |
I don't mean to be overbearing, but perhaps you could use a negative mana regen on units and have your supply units have a mana regen aura. Reduces the amount of mucking with triggers to nearly zero (you just ened a trigger to kill untis with 0 mana). The obsidian statue's replenish ability is an alternative to a mana regen aura. |
| 12-05-2003, 05:55 PM | #4 |
Maybe it's just me, but how do you get a negative value in the mana regen of a unit or for the data value in a mana aura? LD |
| 12-05-2003, 08:34 PM | #5 |
I'm mentally retarded and decide its humerous to ask a question which is irrelevant. Also I'm an umswe whore. |
| 12-05-2003, 08:37 PM | #6 |
Allowing negative real values on the editor prefferences dialog? |
| 12-05-2003, 10:33 PM | #7 |
Thanks Vex, all is taken care of now. LD |
