- Joined
- Aug 19, 2006
- Messages
- 185
Hi, I tried so hard to make a MUI-GUI spell that pulls nearby enemy units to a tower. Pulled units gains a buff called "Notr" lasts 10 seconds. So same units will not be pulled again. I write 4 different triggers.
First one stores the summoned towers.
Second one orders them to cast a dummy spell every 1 second that triggers third trigger.
Third one picks all units around tower that matches conditions when dummy spell casted.
And Fourd one is supposed to pull the units.
But I can't get them work. I will show my triggers maybe you can figure out what is wrong. If you can you get +Rep, If you create it in JASS, you get +Rep and +Credits in my map.
First one stores the summoned towers.
Second one orders them to cast a dummy spell every 1 second that triggers third trigger.
Third one picks all units around tower that matches conditions when dummy spell casted.
And Fourd one is supposed to pull the units.
But I can't get them work. I will show my triggers maybe you can figure out what is wrong. If you can you get +Rep, If you create it in JASS, you get +Rep and +Credits in my map.
-
Electrostatic
-
Events
- Unit - A unit Spawns a summoned unit
-
Conditions
- (Unit-type of (Summoned unit)) Equal to Electrostatic Trap
-
Actions
- Set ES_MUI = (ES_MUI + 1)
- Set ES_Dummy[ES_MUI] = (Summoned unit)
-
Events
-
Electrostatic Casts
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to ES_MUI, do (Actions)
-
Loop - Actions
- Unit - Order ES_Dummy[(Integer A)] to Night Elf Mountain Giant - Taunt
-
Loop - Actions
-
For each (Integer A) from 1 to ES_MUI, do (Actions)
-
Events
-
Electrostatic Pull
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Electrostatic Cast
-
Actions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 800.00 of (Position of (Casting unit)) matching ((ESE_Pulling[(Custom value of (Matching unit))] Equal to False) and (((((Matching unit) is alive) Equal to True) and (((Matching unit) has buff Notr ) Equal to False)) and (((Matching unit) belong and do (Actions)
-
Loop - Actions
- Set ESE_MUI = (ESE_MUI + 1)
- Set ESE_PullUnit[ESE_MUI] = (Picked unit)
- Set ESE_Pulling[ESE_MUI] = True
- Set ESE_EnemyPoint[ESE_MUI] = (Position of ESE_PullUnit[ESE_MUI])
- Set ESE_Trap[ESE_MUI] = (Casting unit)
- Set ESE_Point[ESE_MUI] = (Position of ESE_Trap[ESE_MUI])
- Unit - Create 1 Dummy for (Owner of (Casting unit)) at ESE_EnemyPoint[ESE_MUI] facing Default building facing degrees
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire (Picked unit)
- Unit - Create 1 Dummy for (Owner of (Casting unit)) at ESE_EnemyPoint[ESE_MUI] facing Default building facing degrees
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
- Unit - Turn collision for ESE_PullUnit[(Integer A)] Off
-
Loop - Actions
-
Events
-
Electrostatic Pull Loop
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to ESE_MUI, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (ESE_PullUnit[(Integer A)] has buff Pull ) Equal to True
-
Then - Actions
- Game - Display to (All players) the text: part1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Integer((Distance between ESE_EnemyPoint[(Integer A)] and ESE_Point[(Integer A)]))) Greater than 150
-
Then - Actions
- Game - Display to (All players) the text: part2
- Set ESE_EnemyPoint[(Integer A)] = (Position of ESE_PullUnit[(Integer A)])
- Set ESE_Real[(Integer A)] = (ESE_Real[(Integer A)] + 0.20)
- Unit - Move ESE_PullUnit[(Integer A)] instantly to (ESE_EnemyPoint[(Integer A)] offset by (Power(ESE_Real[(Integer A)], 2.00)) towards ((Angle from ESE_Point[(Integer A)] to ESE_EnemyPoint[(Integer A)]) + 180.00) degrees)
-
Else - Actions
- Game - Display to (All players) the text: else2
- Unit - Cause ESE_Trap[(Integer A)] to damage ESE_PullUnit[(Integer A)], dealing 10.00 damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect attached to the origin of ESE_PullUnit[(Integer A)] using Abilities\Weapons\Bolt\BoltImpact.mdl
- Unit - Turn collision for ESE_PullUnit[(Integer A)] On
- Unit - Remove Pull buff from ESE_PullUnit[(Integer A)]
- Set ESE_Trap[(Integer A)] = No unit
- Set ESE_Real[(Integer A)] = 0.00
- Set ESE_PullUnit[(Integer A)] = No unit
- Custom script: call RemoveLocation (udg_ESE_EnemyPoint[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_ESE_Point[GetForLoopIndexA()])
-
If - Conditions
-
Else - Actions
- Unit - Turn collision for ESE_PullUnit[(Integer A)] On
- Set ESE_Trap[(Integer A)] = No unit
- Set ESE_Real[(Integer A)] = 0.00
- Set ESE_PullUnit[(Integer A)] = No unit
- Custom script: call RemoveLocation (udg_ESE_EnemyPoint[GetForLoopIndexA()])
- Custom script: call RemoveLocation (udg_ESE_Point[GetForLoopIndexA()])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to ESE_MUI, do (Actions)
-
Events