Triggers doesnt work

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
      • 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
      • 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)


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 :?
 

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)
      • 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
      • 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))))
      • Unit Group - Pick every unit in time_units and do (Actions)
        • Loop - Actions
          • EGUI - Make time_target Knockback (Picked unit) towards (Angle from (Position of time_target) to (Position of (Picked unit))) at an initial speed of 250.00 decreasing by 200.00 every second. Enabled killing destructables. Enabled knocking adjacent units. Enabled chain knocking
          • Unit - Cause time_caster to damage time_target, dealing (90.00 x (Real(time_level))) damage of attack type Spells and damage type Normal
      • 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)
      • EGUI - Wait (4.50 - (0.50 x (Real(time_level)))) seconds.


even this doesnt work
wtf is wrong !?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, what DOES happen ??

BTW, you leak some point in your trigger there, like:
Code:
Special Effect - Create a special effect at [COLOR="Red"](Position of time_target)[/COLOR] using NewGroundEX.mdx
Code:
Set time_units = (Units within 350.00 of [COLOR="Red"](Position of time_target)[/COLOR] 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))))
Code:
EGUI - Make time_target Knockback (Picked unit) towards (Angle from [COLOR="Red"](Position of time_target)[/COLOR] to [COLOR="Red"](Position of (Picked unit))[/COLOR]) at an initial speed of 250.00 decreasing by 200.00 every second. Enabled killing destructables. Enabled knocking adjacent units. Enabled chain knocking

Need to put those thing into a Point variable, and use this JASS line to remove the leaks:
JASS:
call RemoveLocation(udg_Your_Variable_Name)


Trigger:
  • 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


The middle line in there isn't needed, since you don't have a wait or something, just remove it and use "Last created special effect" instead to destroy it ;)
 

jig7c

Stop reading me...-statement
Reaction score
123
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)
      • 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
      • 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))))
      • Unit Group - Pick every unit in time_units and do (Actions)
        • Loop - Actions
          • EGUI - Make time_target Knockback (Picked unit) towards (Angle from (Position of time_target) to (Position of (Picked unit))) at an initial speed of 250.00 decreasing by 200.00 every second. Enabled killing destructables. Enabled knocking adjacent units. Enabled chain knocking
          • Unit - Cause time_caster to damage time_target, dealing (90.00 x (Real(time_level))) damage of attack type Spells and damage type Normal
      • 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)
      • EGUI - Wait (4.50 - (0.50 x (Real(time_level)))) seconds.


even this doesnt work
wtf is wrong !?

why do you have player 1(red) in there for?

shouldn't it "belongs to an enemy of (time_caster) equal to true"
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top