feelthless
New Member
- Reaction score
- 1
Trigger:
- Time Bomb 0
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Time Bomb
- Actions
- Set time_caster = (Casting unit)
- Set time_target = (Target unit of ability being cast)
- Set time_level = (Level of Time Bomb for time_caster)
- Set time_counter = (((Integer(4.50)) - ((Integer(0.50)) x time_level)) / (Integer(0.50)))
- For each (Integer A) from 1 to time_counter, do (Actions)
- Loop - Actions
- Floating Text - Create floating text that reads (String(((4.50 - (0.50 x (Real(time_level)))) - (0.50 x (Real((Integer A))))))) above time_target with Z offset 0.00, using font size 12.50, color (100.00%, 33.00%, 66.00%), and 0.00% transparency
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Floating Text - Change the lifespan of (Last created floating text) to 0.75 seconds
- Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
- Wait 0.50 seconds
- Loop - Actions
- Wait (4.50 - (0.50 x (Real(time_level)))) seconds
- Set time_units = (Units within 350.00 of (Position of time_target) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True) and ((Matching unit) Not equal to time_target))))
- Special Effect - Create a special effect at (Position of time_target) using NewGroundEX.mdx
- Set time_effect = (Last created special effect)
- Special Effect - Destroy time_effect
- Unit Group - Pick every unit in time_units and do (Actions)
- Loop - Actions
- Set TempUnit = time_target
- Set TempUnit2 = (Picked unit)
- Set TempLoc = (Position of TempUnit)
- Set TempLoc2 = (Position of TempUnit2)
- -------- call knockback --------
- Set KnockbackCall_Unit = TempUnit2
- Set KnockbackCall_Dur = 0.66
- Set KnockbackCall_Dist = (200.00 + (25.00 x (Real(time_level))))
- Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
- Set KnockbackCall_SFX = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- Set KnockbackCall_DestroyTree = True
- Trigger - Run Knocback Call <gen> (ignoring conditions)
- -------- --- done --- --------
- Custom script: call RemoveLocation( udg_TempLoc )
- Custom script: call RemoveLocation( udg_TempLoc2 )
- Unit - Cause time_caster to damage time_target, dealing (90.00 x (Real(time_level))) damage of attack type Spells and damage type Normal
- Loop - Actions
- If ((time_target belongs to an enemy of Player 1 (Red)) Equal to True) then do (Unit - Cause time_caster to damage time_target, dealing (90.00 x (Real(time_level))) damage of attack type Spells and damage type Normal) else do (Do nothing)
- Events
My trigger simply doesnt work. it is a time bomb ability which waits -- seconds and then explodes, dealing damage and knocking back closer units. Previously i tried with timer but it wasnt accurate.
Any ideas how to fix it :?