• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Trigger help!

Status
Not open for further replies.
Level 6
Joined
Apr 20, 2016
Messages
215
I made This trigger and some how it doesn't actually face the right way and does't go to the right way either
trigger
  • RS2
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (RS_targ is alive) Equal to True
              • (RS_caster is alive) Equal to True
        • Then - Actions
          • Set RS_Counter = (RS_Counter + 1)
          • Unit - Move RS_targ instantly to ((Position of RS_caster) offset by 30.00 towards (Angle from (Position of RS_caster) to (Position of RS_targ)) degrees), facing (Position of RS_caster)
          • Unit - Move RS_caster instantly to (Position of RS_targ), facing (Position of RS_targ)
          • Unit - Cause RS_caster to damage RS_targ, dealing ((Real(RS_Counter)) x ((Real((Agility of RS_caster (Exclude bonuses)))) x 2.50)) damage of attack type Spells and damage type Force
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RS_Counter Equal to 15
            • Then - Actions
              • Unit - Unpause RS_caster
              • Unit - Unpause RS_targ
              • Unit - Explode RS_targ
              • Trigger - Turn off (This trigger)
            • Else - Actions
        • Else - Actions
 
Level 3
Joined
Jul 15, 2013
Messages
54
Try using this:
Rifleman = RS_targ
Footman = RS_caster
The point with offset is very small so you can skip it and use the position instead
And remember to clear leaks

  • Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Move Rifleman 0002 <gen> instantly to (Position of Footman 0001 <gen>)
      • Unit - Make Footman 0001 <gen> face Rifleman 0002 <gen> over 0.00 seconds
      • Unit - Make Rifleman 0002 <gen> face Footman 0001 <gen> over 0.00 seconds
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,378
Your trigger creates 60 leaks per second. You should learn how to store locations in point variables and remove them.

I don't know what you want your trigger to do, but I can tell you what your trigger does.
First of all, it moves the target to the position of caster offset by 30.00. The melee range is usually 100.00, so this may not move the target where you want because of collision boxes of both units.
Then you move the caster to the position of the target. Meaning this you move the caster to the actual position of target (= position of caster offset by 30.00).
 
Level 6
Joined
Apr 20, 2016
Messages
215
well can you improve it coz my mind blows if i think hard on this problem
---------------------------------------------------------------------
all I want to do was to make the unit move to the target facing the same direction of the time it casts the ability
Ps. Dont mind the pause/unpause coz this was just a test ability
 
Status
Not open for further replies.
Top