Author Topic: Homing attacks?  (Read 920 times)

lazyanttu

  • Guest
Homing attacks?
« on: 25 January 2012, 18:08:30 »
Is it possible to make homing attacks with particles?

I have an attack which uses projectile to hit target, but it is not intended to be dodgeable. Because the attack skill attacks a tile instead of unit, I understand this is rather difficult.

Is the only way to make it to not include particle? I have unit called Assault Infantry, which fires rapidly (and has trajectory-type particle effect). However, when enemy unit moves, the attack will miss. Is there a way to make the attack instant-hit (like without particles) and then have the particle for visual effect. Btw. have I understood correctly, non-particle attacks are instant-hits?

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Homing attacks?
« Reply #1 on: 25 January 2012, 18:42:09 »
In the projectile particle XML, inside the trajectory tag, there's an optional <tracking value="false" /> tag which may be added (defaults to false). If true, the projectile will attempt to track the unit. However, last I saw, it had a tendency to miss semi-fast moving targets. Either way, tweak around with it and see how it works for you.

https://docs.megaglest.org/XML/Projectile_particle
« Last Edit: 18 June 2016, 18:00:24 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

lazyanttu

  • Guest
Re: Homing attacks?
« Reply #2 on: 25 January 2012, 19:54:11 »
Ok thanks! I'll try it :).

EDIT: Now it works!

 

anything