| 07-15-2003, 02:52 AM | #1 |
I've gotten my mass invis spell to work, with Wisp casters and such, but although the bulk of the spell does work, the Wisps aren't going away, despite the 2 actions that would remove the wisp. The first method removes the unit variable that the wisp is attached to, and the second method removes all units in a region (where the wisp is). Does anyone know how to remove the wisps this trigger creates? Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Crossroads Fog Actions Cinematic - Fade out and back in over 3.00 seconds using texture Haze And Fog and color (50.00%, 50.00%, 75.00%) with 25.00% transparency Unit Group - Pick every unit in (Units within 512.00 of (Position of (Casting unit))) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) belongs to an ally of (Owner of (Casting unit))) Equal to True Then - Actions Unit - Create 1 Caster R1 for Player 4 (Purple) at (Random point in ACastZone <gen>) facing Default building facing degrees Set CSCaster[0] = (Last created unit) Unit - Order CSCaster[0] to Human Sorceress - Invisibility (Picked unit) Wait 0.01 game-time seconds Unit - Remove CSCaster[0] from the game Else - Actions Wait 1.00 game-time seconds Unit Group - Pick every unit in (Units in ACastZone <gen>) and do (Actions) Loop - Actions Unit - Remove (Picked unit) from the game |
| 07-15-2003, 03:34 AM | #2 |
Try something like this... I'm not sure exactly why your trigger doesn't work, but I know for a fact this one does. It's a modified version of one of my spells. Untitled Trigger 001 Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Mass Invis Actions Unit Group - Pick every unit in (Units in (Region centered at (Position of (Casting unit)) with size (512.00, 512.00)) matching (((Owner of (Matching unit)) is an ally of (Owner of (Casting unit))) Equal to True)) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) is A structure) Equal to False ((Picked unit) is alive) Equal to True Then - Actions Unit - Create 1 Wisp for (Owner of (Casting unit)) at (Position of (Picked unit)) facing Default building facing degrees Unit - Order (Last created unit) to Human Sorceress - Invisibility (Picked unit) Unit - Add a 2.00 second Generic expiration timer to (Last created unit) Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl Special Effect - Destroy (Last created special effect) Else - Actions Do nothing |
