• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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:
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.
 
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:
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.
 
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

Last edited:
Status
Not open for further replies.
Back
Top