• 🏆 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] Boots of Speed

Status
Not open for further replies.
  • Boots of Speed alliance
    • Events
      • Unit - A unit enters Alliance Boots <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Paladin
          • (Triggering unit) Equal to Archmage
          • (Triggering unit) Equal to Mountain_King
          • (Triggering unit) Equal to Blood_Mage
          • (Triggering unit) Equal to Ranger
          • (Triggering unit) Equal to Wizard
    • Actions
      • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) + 200.00)
      • Unit - Kill Boots of Speed 0038 <gen>
      • Trigger - Turn on turn off alliance <gen>
      • Trigger - Turn off (This trigger)
      • Wait 10.00 seconds
      • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) - 200.00)
  • turn off alliance
    • Events
      • Time - Elapsed game time is 120.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 Boots of Speed for Neutral Passive at (Center of Alliance Boots <gen>) facing Default building facing degrees
      • Trigger - Turn on Boots of Speed alliance <gen>
      • Trigger - Turn off (This trigger)
Why this triggers only once? Help me with this function.
 
I don't quite understand your problem... you mean when the unit dies, and revived... the movement speed decreases??

no... in the first trigger it is shown that when a unit of these enter the boots region his movement is increased and then this trigger is turned off. and after some time the trigger for the region is turned on again so you can increase your speed again. Unfortunately somehow this does not work. Only the boots unit is respawned.
 
Level 25
Joined
Sep 26, 2009
Messages
2,373
Instead of "Elapsed Game Time" use countdown timer.
As I understand it, the problem is that "Elapsed Game Time" is elapsed time from the start of the game, it's not a timer, so even if you switch that trigger on/off, it will run only once - exactly 120 seconds since start of the game - and turn the first trigger on. It will not run more than that.
(which in actual game means that if you manage to enter the region for bonus speed within those 120 seconds, you may use it once more later)

So yeah, just create a "Timer" variable, and when unit enter region, use this action:
  • Countdown Timer - Start Your_Timer as a One-shot timer that will expire in 120.00 seconds
and in the second trigger, replace the event "Elapsed Game Time" with this:
  • Time - Your_Timer expires
with "Your_Timer" being the timer variable.
 
Level 13
Joined
Dec 21, 2010
Messages
540
no... in the first trigger it is shown that when a unit of these enter the boots region his movement is increased and then this trigger is turned off. and after some time the trigger for the region is turned on again so you can increase your speed again. Unfortunately somehow this does not work. Only the boots unit is respawned.

Ok..In that case don't use elapsed of game time because this event will only fire once.. as chaosy said .. changed it every 120 seconds of game time.. and instead of turning on and off a trigger .. make a Boolean variable to check it.
 
Okay, I invented another way of doing the function of the boots. Now tell me why after I get the effect and the boots die then after the triggers "re-run" the boots suicide kill without any unit within the region? D:
  • BoS 1
    • Events
      • Unit - A unit enters Alliance Boots <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • speed1 Equal to 0
        • Then - Actions
          • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) + 200.00)
          • Unit Group - Pick every unit in (Units in Alliance Boots <gen> matching ((Race of (Matching unit)) Equal to Undead)) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
          • Set speed1 = 1
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using war3mapImported\VioletPulse.mdx
          • Wait 10.00 seconds
          • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) - 200.00)
          • Wait 10.00 seconds
          • Unit - Create 1 Boots of Speed for Neutral Passive at (Center of Alliance Boots <gen>) facing Default building facing degrees
          • Set speed1 = 0
        • Else - Actions
 
Level 13
Joined
Dec 21, 2010
Messages
540
Okay, I invented another way of doing the function of the boots. Now tell me why after I get the effect and the boots die then after the triggers "re-run" the boots suicide kill without any unit within the region? D:
  • BoS 1
    • Events
      • Unit - A unit enters Alliance Boots <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • speed1 Equal to 0
        • Then - Actions
          • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) + 200.00)
          • Unit Group - Pick every unit in (Units in Alliance Boots <gen> matching ((Race of (Matching unit)) Equal to Undead)) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
          • Set speed1 = 1
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using war3mapImported\VioletPulse.mdx
          • Wait 10.00 seconds
          • Unit - Set (Triggering unit) movement speed to ((Current movement speed of (Triggering unit)) - 200.00)
          • Wait 10.00 seconds
          • Unit - Create 1 Boots of Speed for Neutral Passive at (Center of Alliance Boots <gen>) facing Default building facing degrees
          • Set speed1 = 0
        • Else - Actions

It's much better if it is a Boolean variable..
And it will leak because of the unit group so you must destroy it..
Then using "wait" will make bug to your (triggering unit) so you must create A variable for the unit.
And also the special effect will leak so u must destroy it too..


  • BoS 1
    • Events
      • Unit - A unit enters Alliance Boots <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Speed_Check Equal to False
        • Then - Actions
          • Set Speed_Unit = (Entering unit)
          • Unit - Set Speed_Unit movement speed to ((Current movement speed of (Speed_Unit)) + 200.00)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units in Alliance Boots <gen> matching ((Race of (Matching unit)) Equal to Undead)) and do (Actions)
            • Loop - Actions
              • Unit - Kill (Picked unit)
          • Set Speed Check = True
          • Special Effect - Create a special effect attached to the origin of (Speed_Unit) using war3mapImported\VioletPulse.mdx
          • Special Effect - Destroy (Last created special effect)
          • Wait 10.00 seconds
          • Unit - Set Speed_Unit movement speed to ((Current movement speed of (Speed_Unit)) - 200.00)
          • Wait 10.00 seconds
          • Unit - Create 1 Boots of Speed for Neutral Passive at (Center of Alliance Boots <gen>) facing Default building facing degrees
          • Set Speed_Check = Flase
          • Set Speed_Unit = (No unit)
        • Else - Actions
 
Status
Not open for further replies.
Top