HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help with GUI trigger

09-07-2006, 04:49 PM#1
zeroXD
I am making a GUI trigger wich is supposed to create 8 floating things around the caster that circles around at 300 range, but the problem is that the dummy units wont show up at all. Its like if they are just removed at once they are created. First it worked, but when i created the "Move Shield", "Shield Knockback" and "Slide SFX" triggers something went wrong. here is the triggers.

Trigger:
Inferno Shield
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Inferno Shield
Collapse Actions
Set ShieldCaster = (Triggering unit)
Collapse For each (Integer ShieldInteger) from 1 to 8, do (Actions)
Collapse Loop - Actions
Unit - Create 1 Dummy ArcaneShield for (Owner of ShieldCaster) at ((Position of ShieldCaster) offset by 300.00 towards (45.00 x (Real(ShieldInteger))) degrees) facing Default building facing degrees
Set ShieldDummy[ShieldInteger] = (Last created unit)
Countdown Timer - Start ShieldTimer as a One-shot timer that will expire in 0.02 seconds
Set ShieldTimer = (Last started timer)
Trigger - Turn on Moving Shield <gen>
Countdown Timer - Start ShieldKnockTimer as a One-shot timer that will expire in 0.02 seconds
Set ShieldKnockTimer = (Last started timer)
Trigger - Turn on Shield Knockback <gen>
Countdown Timer - Start ShieldKnockDustTimer as a One-shot timer that will expire in 0.08 seconds
Set ShieldKnockDustTimer = (Last started timer)
Trigger - Turn on Slide Dust SFX Shield <gen>
Wait 15.00 seconds
Trigger - Turn off Moving Shield <gen>
Collapse For each (Integer ShieldInteger) from 1 to 8, do (Actions)
Collapse Loop - Actions
Unit - Remove ShieldDummy[ShieldInteger] from the game
Set ShieldTarget[ShieldInteger] = No unit
Wait 1.00 seconds
Trigger - Turn off Shield Knockback <gen>
Trigger - Turn off Slide Dust SFX Shield <gen>
Set ShieldCaster = No unit

Trigger:
Moving Shield
Collapse Events
Time - ShieldTimer expires
Conditions
Collapse Actions
Countdown Timer - Start ShieldTimer as a One-shot timer that will expire in 0.02 seconds
Collapse For each (Integer ShieldInteger) from 1 to 8, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
ShieldDummy[ShieldInteger] Not equal to No unit
Collapse Then - Actions
Unit - Move ShieldDummy[ShieldInteger] instantly to ((Position of ShieldCaster) offset by 300.00 towards ((Angle from (Position of ShieldCaster) to (Position of ShieldDummy[ShieldInteger])) + 2.50) degrees)
Collapse Unit Group - Pick every unit in (Random 1 units from (Units within 75.00 of (Position of ShieldDummy[ShieldInteger]) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of HookCaster) and do (Actions)
Collapse Loop - Actions
Set ShieldTarget[ShieldInteger] = (Picked unit)
Set ShieldKnockAngle[ShieldInteger] = (Angle from (Position of ShieldDummy[ShieldInteger]) to (Position of (Picked unit)))
Set ShieldKnockDist[ShieldInteger] = 20.00
Unit - Remove ShieldDummy[ShieldInteger] from the game
Set ShieldDummy[ShieldInteger] = No unit
Unit - Cause ShieldCaster to damage (Picked unit), dealing (100.00 x (Real((Level of Inferno Shield for ShieldCaster)))) damage of attack type Spells and damage type Fire
Collapse Else - Actions
Do nothing

Trigger:
Shield Knockback
Collapse Events
Time - ShieldKnockTimer expires
Conditions
Collapse Actions
Countdown Timer - Start ShieldKnockTimer as a One-shot timer that will expire in 0.02 seconds
Collapse For each (Integer ShieldInteger2) from 1 to 8, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
ShieldTarget[ShieldInteger2] Not equal to No unit
Collapse Then - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
ShieldKnockDist[ShieldInteger2] Less than or equal to 0.05
Collapse Then - Actions
Set ShieldTarget[ShieldInteger2] = No unit
Collapse Else - Actions
Unit - Move ShieldTarget[ShieldInteger2] instantly to ((Position of ShieldTarget[ShieldInteger2]) offset by ShieldKnockDist[ShieldInteger2] towards ShieldKnockAngle[ShieldInteger2] degrees)
Set ShieldKnockDist[ShieldInteger2] = (ShieldKnockDist[ShieldInteger2] - 0.12)
Collapse Else - Actions
Do nothing

Trigger:
Slide Dust SFX Shield
Collapse Events
Time - ShieldKnockDustTimer expires
Conditions
Collapse Actions
Countdown Timer - Start ShieldKnockDustTimer as a One-shot timer that will expire in 0.08 seconds
Collapse For each (Integer ShieldInteger3) from 1 to 8, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
ShieldTarget[ShieldInteger3] Not equal to No unit
Collapse Then - Actions
Special Effect - Create a special effect at (Position of ShieldTarget[ShieldInteger3]) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Special Effect - Destroy (Last created special effect)
Collapse Else - Actions
Do nothing

EDIT: Managed to get it work, now there is a problem with the "Move Shield" that makes the orbs not move at same speed as each other when the casting unit moves. Help, please...