- Joined
- Jun 13, 2017
- Messages
- 83
I just made my first mui spell, and its working very well at least as far as i know about triggering.
Here is what i want to know:
Edit: only these is what i need
1- if there is anything still need a fix or make it better.
2- better spell to use for dummy. Channel ability like life drain but without any animation.
Edit: Changed both triggers to make them better based on the points you gave me, and this is what i got.
For some reason if i didn't order the caster to stop after unpause in the second trigger, they will cast the spell again and again, so had to order to stop and it fixed it.
Here is what i want to know:
Edit: only these is what i need
1- if there is anything still need a fix or make it better.
2- better spell to use for dummy. Channel ability like life drain but without any animation.
Edit: Changed both triggers to make them better based on the points you gave me, and this is what i got.
-
Thunder Grip Set
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Dummy
-
Actions
- -------- Base Setting --------
- Set TG_Index = (TG_Index + 1)
- -------- - --------
- -------- Caster/Target --------
- Set TG_Caster[TG_Index] = (Triggering unit)
- Set TG_Target[TG_Index] = (Target unit of ability being cast)
- -------- - --------
- -------- Locations --------
- Set TG_CasterLoc[TG_Index] = (Position of TG_Caster[TG_Index])
- -------- - --------
- -------- Effect Time --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (TG_Target[TG_Index] is A Hero) Equal to True
-
Then - Actions
- Set TG_Counter[TG_Index] = 3
-
Else - Actions
- Set TG_Counter[TG_Index] = 15
-
If - Conditions
- -------- - --------
- -------- Start Effect --------
- Unit - Pause TG_Caster[TG_Index]
- Unit - Pause TG_Target[TG_Index]
- Unit - Create 1 TG_Dummy for (Owner of TG_Caster[TG_Index]) at TG_CasterLoc[TG_Index] facing TG_CasterLoc[TG_Index]
- Set TG_Dummy[TG_Index] = (Last created unit)
- Unit - Add a 3.00 second Generic expiration timer to TG_Dummy[TG_Index]
- Unit - Order TG_Dummy[TG_Index] to Neutral Dark Ranger - Life Drain TG_Target[TG_Index]
- -------- - --------
- -------- Damage trigger on --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TG_Index Equal to 1
-
Then - Actions
- Trigger - Turn on Thunder Grip Pull and Damage <gen>
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_TG_CasterLoc[udg_TG_Index])
-
Events
For some reason if i didn't order the caster to stop after unpause in the second trigger, they will cast the spell again and again, so had to order to stop and it fixed it.
-
Thunder Grip Pull and Damage
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
For each (Integer TG_Loop) from 1 to TG_Index, do (Actions)
-
Loop - Actions
- -------- Locations --------
- Set TG_CasterLoc[TG_Loop] = (Position of TG_Dummy[TG_Loop])
- Set TG_TargetLoc[TG_Loop] = (Position of TG_Target[TG_Loop])
- -------- - --------
- -------- Distance and moving --------
- Set TG_Angle[TG_Loop] = (Angle from TG_TargetLoc[TG_Loop] to TG_CasterLoc[TG_Loop])
- Set TG_Distance[TG_Loop] = ((Distance between TG_CasterLoc[TG_Loop] and TG_TargetLoc[TG_Loop]) / 10.00)
- Unit - Move TG_Target[TG_Loop] instantly to (TG_TargetLoc[TG_Loop] offset by TG_Distance[TG_Loop] towards TG_Angle[TG_Loop] degrees)
- -------- - --------
- -------- Timer to know when ability end --------
- Set TG_Counter[TG_Loop] = (TG_Counter[TG_Loop] - 1)
- -------- - --------
- Custom script: call RemoveLocation(udg_TG_CasterLoc[udg_TG_Loop])
- Custom script: call RemoveLocation(udg_TG_TargetLoc[udg_TG_Loop])
- -------- - --------
- -------- Check if unit is alive while in effect --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (TG_Caster[TG_Loop] is alive) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TG_Counter[TG_Loop] Equal to 0
-
Then - Actions
- -------- Special Effect and Damage --------
- Special Effect - Create a special effect attached to the origin of TG_Target[TG_Loop] using Abilities\Weapons\ChimaeraLightningMissile\ChimaeraLightningMissile.mdl
- Special Effect - Destroy (Last created special effect)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (TG_Target[TG_Loop] is A Hero) Equal to True
-
Then - Actions
- Unit - Cause TG_Caster[TG_Loop] to damage TG_Target[TG_Loop], dealing 100.00 damage of attack type Normal and damage type Normal
-
Else - Actions
- Unit - Cause TG_Caster[TG_Loop] to damage TG_Target[TG_Loop], dealing 50.00 damage of attack type Normal and damage type Normal
-
If - Conditions
- Set TG_End = True
- Else - Actions
-
If - Conditions
- -------- - --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Set TG_End = True
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TG_End Equal to True
-
Then - Actions
- -------- Check trigger description --------
- -------- End --------
- Unit - Unpause TG_Caster[TG_Loop]
- Unit - Order TG_Caster[TG_Loop] to Stop
- Unit - Unpause TG_Target[TG_Loop]
- Unit - Remove TG_Dummy[TG_Loop] from the game
- Set TG_Dummy[TG_Loop] = TG_Dummy[TG_Index]
- Set TG_Counter[TG_Loop] = TG_Counter[TG_Index]
- Set TG_Caster[TG_Loop] = TG_Caster[TG_Index]
- Set TG_Target[TG_Loop] = TG_Target[TG_Index]
- Set TG_CasterLoc[TG_Loop] = TG_CasterLoc[TG_Index]
- Set TG_TargetLoc[TG_Loop] = TG_TargetLoc[TG_Index]
- Set TG_Distance[TG_Loop] = TG_Distance[TG_Index]
- Set TG_Index = (TG_Index - 1)
- Set TG_Loop = (TG_Loop - 1)
- Set TG_End = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TG_Index Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer TG_Loop) from 1 to TG_Index, do (Actions)
-
Events
Last edited: