- Joined
- Jan 19, 2010
- Messages
- 73
Need Help with a damage trigger[Fixed]
Was making a spell trigger for my friends map and it worked well cept it won't damage enemies . I spent half an hour trying to fix it but I can't get the damage to work. It's probably just a small miss that I can't find.
If someone could point it out I would be really grateful.
Edit: The last thing that won't show on the conditions for tempgroup is if matching unit is alive equal to true.
Was making a spell trigger for my friends map and it worked well cept it won't damage enemies . I spent half an hour trying to fix it but I can't get the damage to work. It's probably just a small miss that I can't find.
If someone could point it out I would be really grateful.
-
Ice Spear
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Ice Spear
-
Actions
- -------- Saves the positions needed, to remove leaks. --------
- Set tempPoint = (Target point of ability being cast)
- Set caster_point = (Position of (Triggering unit))
- -------- Now we get the angle and uses this to create lots of special effects. We also add units to the group later used for damage. --------
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
- -------- Saves the position we are in of the novas. --------
- Set ice_temp_point = (caster_point offset by (100.00 x (Real((Integer A)))) towards (Angle from caster_point to tempPoint) degrees)
- Special Effect - Create a special effect at ice_temp_point using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
- Special Effect - Destroy (Last created special effect)
- -------- We create a unit group which we use to add units to the main group. Then we destroy that unit group. All to avoid leaks --------
- Set tempGroup = (Units within 150.00 of ice_temp_point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matchi
-
Unit Group - Pick every unit in tempGroup and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to ice_group
-
Loop - Actions
- Custom script: call DestroyGroup( udg_tempGroup )
-
Loop - Actions
- -------- Get's The basic damage, then adds strenght in the damage action. --------
- Set damage = 170
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Ice Spear for (Triggering unit)) Equal to 2
-
Then - Actions
- Set damage = 240
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Ice Spear for (Triggering unit)) Equal to 3
-
Then - Actions
- Set damage = 310
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Ice Spear for (Triggering unit)) Equal to 4
-
Then - Actions
- Set damage = 430
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Unit Group - Pick every unit in ice_group and do (Actions)
-
Loop - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real(damage)) + ((Real((Strength of (Triggering unit) (Include bonuses)))) x 2.00)) damage of attack type Spells and damage type Normal
-
Loop - Actions
- Custom script: call DestroyGroup( udg_ice_group )
- Custom script: call RemoveLocation( udg_tempPoint )
- Custom script: call RemoveLocation( udg_caster_point )
- Custom script: call RemoveLocation( udg_ice_temp_point )
-
Events
Last edited: