- Joined
- Jul 29, 2010
- Messages
- 319
how do i make this trigger check if the unit the projectile hits dies, then add +1 to a leaderboard value
-
USE ABILITY
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Ability being cast) Equal to Fire Blaster!
-
-
Then - Actions
-
Set Attackingunit[(Player number of (Triggering player))] = (Casting unit)
-
Set point[0] = (Position of (Triggering unit))
-
Set point[1] = (Target point of ability being cast)
-
Set point[2] = (point[0] offset by 20.00 towards (Angle from point[0] to point[1]) degrees)
-
Unit - Create 1 Dummy Bullet (arrow) for (Owner of (Triggering unit)) at point[2] facing (Angle from point[0] to point[1]) degrees
-
Animation - Change (Last created unit) flying height to 60.00 at 0.00
-
Set unit[0] = (Last created unit)
-
Custom script: set udg_integer = GetHandleIdBJ( udg_unit[0] )
-
Unit Group - Add (Last created unit) to dummygroup
-
Hashtable - Save (Angle from point[0] to point[1]) as 0 of integer in HASHARROW
-
-------- ARROW'S SPEED (RANGE PER 1 SEC) --------
-
Set real[0] = 3000.00
-
Hashtable - Save (real[0] / 100.00) as 1 of integer in HASHARROW
-
-------- ARROW HIT AREA --------
-
Set real[0] = 50.00
-
Hashtable - Save (real[0] / 1.00) as 2 of integer in HASHARROW
-
-------- DAMAGE --------
-
Set real[0] = 200.00
-
Hashtable - Save (real[0] / 1.00) as 3 of integer in HASHARROW
-
-------- MAX RANGE --------
-
Set real[0] = 1000.00
-
Hashtable - Save (real[0] / 1.00) as 6 of integer in HASHARROW
-
-------- GROUP TO AVOID DOUBLE DAMAGE THE SAME TARGET --------
-
Set group = (Units within (Load 2 of integer from HASHARROW) of point[1] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of unit[0])) Equal to True)))
-
Custom script: call GroupClear( udg_group )
-
Hashtable - Save Handle Ofgroup as 5 of integer in HASHARROW
-
Custom script: call RemoveLocation( udg_point[0] )
-
Custom script: call RemoveLocation( udg_point[1] )
-
Custom script: call RemoveLocation( udg_point[2] )
-
-
Else - Actions
-
-
-