| 02-29-2004, 11:20 PM | #1 |
I had really wanted to get this all to work on my own, and got almost completely done, but I don't feel like spending any more time on it. E: Unit - A unit Finishes casting an ability C: (Ability being cast) Equal to Electric Bolt A: Game - Display to (All players)Unit Group - Pick every unit in (Units in (Entire map) matching (((Matching unit) has buff E Bolt Detector ) Equal to True)) and do (Unit Group - Add (Picked unit) to EBTargets) the text: DEBUG - Electric Bo... Set EBNumber = (Number of units in EBTargets) Game - Display to (All players) the text: (String(EBNumber)) For each (Integer A) from 1 to EBNumber, do (Actions) Loop - Actions Set EBNumber = (Number of units in EBTargets) Game - Display to (All players) the text: (String(EBNumber)) Special Effect - Create a special effect at (Position of (Random unit from EBTargets)) using Doodads\Cinematic\Lightningbolt\Lightningbolt.mdl Unit Group - Remove (Picked unit) from EBTargets Wait 0.10 seconds Special Effect - Destroy (Last created special effect) How do I make that unit actually get removed each time the loop runs? |
| 02-29-2004, 11:37 PM | #2 |
I think just Unit Group - Clear or something like that. |
| 02-29-2004, 11:38 PM | #3 |
I need to only remove one unit per run of the loop, so the effect hits all the units and afterwards the unit group is empty. Clearing it will not work. |
| 02-29-2004, 11:39 PM | #4 |
So you want it to remove specific unit? |
| 02-29-2004, 11:42 PM | #5 |
I want it to use the lightning bolt on the unit, then remove said unit from the group. |
| 02-29-2004, 11:49 PM | #6 |
I had a simular problem with some spells I made (The spell is very cool, teleports around dealing damage all through triggers). Anyway, I said set a unit varible to random unit in unit group then make all triggers affect the unit, then remove unit varible from unit group. |
| 02-29-2004, 11:51 PM | #7 |
How do I go about removing the unit, though? Matching, picked, and triggering unit do not work. |
| 02-29-2004, 11:55 PM | #8 |
Set UnitVarible = Random unit from XUnitGroup Unit Group - Remove Unit; Remove UnitVarible from XUnitGroup |
| 03-01-2004, 12:08 AM | #9 |
That worked. Now my framework is complete. TY :) |
