• 🏆 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!

help

Status
Not open for further replies.
Level 4
Joined
Dec 4, 2014
Messages
97
hi guys i need some help with a trigger i want a dummy to move to the position of the enemy

the only action i found was to move the dummy instantly but i dont want that it moves instantly
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
hi guys i need some help with a trigger i want a dummy to move to the position of the enemy

the only action i found was to move the dummy instantly but i dont want that it moves instantly
Usually done by using a timer or event with a low period (eg 0.03 seconds). Each tick moves the unit a small amount towards its final destination. The amount moved is determined using the high school physics formula {v = s / t} where v is velocity, s is displacement and t is time.

If it moves a straight line path you can use vector mathematics to compute an X and Y offset to apply to it each tick at the start. This saves on expensive sine and cosine calls.

To save time writing your own implementation, consider using one of the dozens of ready-made systems on this site which handle movement over time. They are usually called "projectile systems" or "movement systems" or similar.
 
Level 4
Joined
Dec 4, 2014
Messages
97
thats my trigger
file.php
how it is now but the shurican dont move -.- really need your help ^^
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Looks like they would move to me, although instantly.

You will need to use some sort of movement system. These are usually made a trigger/timer firing multiple times per second (period of 0.03 seconds usually) that moves the unit instantly a little closer to the target location each tick.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Are you sure that you want to move all 6 dummies to the same location?
(Not really fixing your problem but it looks like you missed that.)

What you have to do is make a group and add the unit (missile) to that group.
Every 0.03 seconds of gametime (in a new trigger), you look through every unit from the group and move them instantly towards the targeted location with a small offset (0.03*speed)

When they reach the destination, you remove them.
(You might want to use a unit-array rather than a unit group.)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Hmm...

I think you should best use an existing missile system that can transform a unit into a missile.
One like mine... but mine is not up-to-date and even my version is unfinished :D

It is a bit more complicated than what you are probably capable of at this moment.
 
Level 4
Joined
Dec 4, 2014
Messages
97
a friend of mine who is a really good trigger did me a spell and told me to look at this spell cauz its similar so i kopied the loop from it thats why the conditioin is still in there but i will take it out soon

i will try it right away
 
Level 4
Joined
Dec 4, 2014
Messages
97
i did changed it to target point of ability being cast but nothing happend he only created the dummy but didnt moved it
 
Level 25
Joined
May 11, 2007
Messages
4,651
I would assume your loop trigger doesn't run as the if then else condition doesn't have a condition it can run, so it makes it into the "else" part which is to turn off the loop trigger.
 
Level 25
Joined
May 11, 2007
Messages
4,651
You still have the trigger - turn off action, that trigger will run for 0.03 seconds and then turns itself off.

Remove the trigger - turn off (this trigger) and your unit should move around.
Then we can work on getting it to stop when you want it to.
 
Status
Not open for further replies.
Top