• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Trigger-based movement?

Status
Not open for further replies.
Level 11
Joined
Dec 8, 2006
Messages
334
Hi
So, in some maps, units are not moving normally. For example: Warlock or Hungry Hungry Fellhounds. They start slow, but their speed increases as they go. Also, when they are ordered to go in the opposite direction, they don't turn right away, but slide a while in the direction they were going at first, because of momentum.
It's like they're on ice or some slick surface.

Do you know what I mean? I usually suck at explaining things, so if it's not clear, just tell and I'll try to specify.

So, how would I do something like that? You don't have to write the whole thing, it'll be enough if you just explain the basic logic behind it.
Thanks for any reply!
 
Last edited:
Interesting, you want to create something like movement on ice -.^?

Well I guess you need few triggers for that!
1st that will check player orders, if he order unit to move then run 2nd trigger!
2nd trigger will then increase unit speed, each I don't know 0.03 sec, by 1!
Then we use 3th trigger: If player order unit to stop or 2 move to another location then run 4th trigger:
4th trigger will just like 2nd count time with some formula (larger ms more time to stop) and reduce unit ms by number gained from formula (1/2/3/5/10/20), + unit will be instantly moved each 0.03 or 0.02 sec in facing direction or in direction, we ordered first!

Well I hope you can understand my idea (you can see that 1st and 4th are same, but we need 1st only to first time setup other triggers (2/3/4))

Do you know what I mean? I usually suck at explaining things, so if it's not clear, just tell and I'll try to specify.
If you suck what then I need to say :D
 
So I hit the target :D

Well I don't know, for start you can use constant (exp:10 ms each 0.10 sec), so unit need, let say, 1 sec delay to move to another point...

Still best way for this is to make it in JASS or vJASS, GUI can be very hard, maybe you can ask some users (that know JASS very well), just post question on their profile, and somebody will give you right answer :thumbs_up:
 
Status
Not open for further replies.
Top