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 :?
 
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 !?
 
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 ;)
 
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 The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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