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

Homing missiled? how would you do it?

Status
Not open for further replies.
Level 13
Joined
Jun 5, 2008
Messages
504
I want to create homing missile spell, that would chase the enemy. If it misses the target unit, it will slowly turn and start chasing the unit again.

I dont know if that explained it enought...But I was thinking whats the best way to do it. Should the angle of missile be changed and ordered to move some point. Or can it be some other way?

like in hungry felhounds or warlocks homing missile.
 
Last edited:
Level 4
Joined
Jul 24, 2008
Messages
108
I know the map warlocks v0.81 has a spell called homing missiles. It does exactly that, i suggest you try to open the map and look at the code on how its done. I don't know if its protected or not but its worth a look.
 
Level 7
Joined
Jul 20, 2008
Messages
377
Basically, periodically make the unit turn toward its target as opposed to moving straight at the target.

That is to say, in the latter case, you simply move the missile toward the target. It's guaranteed to hit.

But you want the former case, which basically just makes the missile move forward but you change its angle periodically to line up w/ the target. The more you change its angle, the better it homes.

Periodically, you:

1) Update its angle (may be a custom value or a variable linked to that unit)
2) Move it in that direction
3) Profit.

This makes it possible to evade the homing missile.
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Basically, periodically make the unit turn toward its target as opposed to moving straight at the target.

That is to say, in the latter case, you simply move the missile toward the target. It's guaranteed to hit.

But you want the former case, which basically just makes the missile move forward but you change its angle periodically to line up w/ the target. The more you change its angle, the better it homes.

Periodically, you:

1) Update its angle (may be a custom value or a variable linked to that unit)
2) Move it in that direction
3) Profit.

This makes it possible to evade the homing missile.

How is that possible to evade ? Didn't get it.
You should give it a velocity towards the target, then every now and then (not VERY fast) change it's facing angle a bit towards the target.
Just mess with the times between changing and the value that changes and you can get a nice looking homing thingy.
 
Level 13
Joined
Jun 5, 2008
Messages
504
Sounds simple, but i find it a bit hard to make it. I found felhounds map that has similar system.

Does it have to be that complicated as it seems from that? Well I quess i would first have to learn it myself (felhound system) to create a better one.

*edit* nvm...its simple enough. i suggest checking that map if you wana do homing missile thingys.
 

Attachments

  • HungryHungryFelhounds0.75.w3x
    93.8 KB · Views: 47
Last edited:
Level 7
Joined
Sep 5, 2006
Messages
334
I think I understand what he meant, I will do the spell as soon as I can, should done it in a day.Spell Done
 

Attachments

  • HomingMissile.w3x
    18.3 KB · Views: 59
Last edited:
Status
Not open for further replies.
Top