• 🏆 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] Continued movement?

Status
Not open for further replies.
Level 7
Joined
Sep 24, 2008
Messages
281
Hello Hiveworkshop community, I am attempting to make a "bomb ability." The goal is essentially to create a bomber at the top left of my map, have it fly from that position to the point of the ability being cast, and too continue untill it leaves the area. I have figured out how to create the bomber, and to get it to move to the ability's location, but not how to make it keep moving. Can anyone tell me how to accomplish this?
 
Level 7
Joined
Sep 24, 2008
Messages
281
ugh.. just have a tiny region lying around and have it move to where the ability is casted then make it so when the bomber reaches that region he goes straight forward or whatever..

That was hardly of any help... all I want to know is how to make the bomber continue moving. What is the trigger or script for that?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You could use a slide-trigger for it, so when it activates the ability, the slide-trigger will activate.
It looks something like this:

  • Slide
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ([Your Region] contains [Sliding Unit]) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
          • Unit - Unpause [Sliding Unit]
        • Else - Actions
      • Set TempLoc[1] = (Position of [Sliding Unit])
      • Set TempLoc[2] = (TempLoc[1] offset by 5.00 towards (Facing of [Sliding Unit]) degrees)
      • Unit - Move [Sliding Unit] instantly to TempLoc[2]
      • Custom script: call RemoveLocation(udg_TempLoc[1])
      • Custom script: call RemoveLocation(udg_TempLoc[2])
Note: I did not test this trigger, it might not work exactly as you want it, but I hope this can at least inspire you.



  • Pause the unit after he casts the ability (unless you want him to be able to turn).
  • You can modify the offset to reduce/increase the speed.
  • TempLoc: Point Variable (array at least 2).
  • [Your Region] is the region where the unit stops moving.
  • [Sliding Unit] is (obviously) the unit that needs to move straight forward.


If you need more information, or this doesn't work (+ reason why, please), post it here and I (or anyone else) will try to help.
 
Level 7
Joined
Sep 24, 2008
Messages
281
Just to clarify, this is what I'm trying to do:
A unit uses an ability in the jungle portion of my map called Bombardment. Then, a bomber is created in the upper left part of the map. That bomber is ordered to move to the location of the ability's casting point. Once it gets there, a special effect is created using an imported explosion. Then, the bomber continues off screen. How can I do this?
Now, I don't know how to do this, but if someone does, there is a large amount of room for improvement:
1. Bomber can be ordered to go across the region origionaly, so that there doesn't need to be a second order, and the flight is more fluent (unless it already is, I don't know.)
2. A bombing run ability- the player selects two points (how do I do that?) and the bomber is created, runs along that line, and scatters bombs along it.
Anyway, if you have any information regarding this topic, please post. Thank you.
 
Level 4
Joined
Feb 25, 2008
Messages
58
Use a trigger so that when the bomber casts a custom spell based off of windwalk (windwalk doesn't interrupt movement) a unit is created at the point of the bomber unit who casts a custom thunder clap or w.e u want to damage/do effects. Make the windwalk have a 0 duration for invis and a .01 sec fade time or something like that.
 
Status
Not open for further replies.
Top