[SOLVED]How do I make a homing projectile?

For my project I have a variaty of weapons I want to add and that includes a rocket launcher that creates a projectile that homes into targets but I don’t want the projectile to home into the target pinpoint I just want it to track the enemies last known position.

Also how do I make an aoe explosion? when I want the rocket to get destroyed I want it to have a small aoe.

There is a behavior called “Magnetic Effect” you might want to look into.
Another way is to use the action “Add a force to move toward an object.”
If you want to do it manually I suppose you could set your projectile to rotate towards the target, then give it a force angle.
Oh and maybe give it a certain time interval when updating the angle of rotation. That way you could have that its just following the last known position until the next rotation update.

As for aoe, I think probably use “distance between two objects” where if an object is within a certain number of pixels away from the explosion, then damage is dealt.

My approach would be
You have option to fire toward position so if you fire toward CENTER position of object and it moves and you are using trigger once bullet should go where object was at the moment of firing

So if object move away it will go to where object was and not where it currently is

On top of that you use distance between positions bullet and object position (that position which object had when you fired)
And if distance is below 1 or 2 (you will need to test which suits you better) delete bullet

Now for AoE

When bullet is deleted
I mean above action where you delete it you can make animation of explosion
simply create explosion object in position of bullet and delete bullet and let explosion animation play
Now you simply make event that if object is in collision with explosion you damage object

As simple as that

Can you make an event example for the homing projectile? because I can’t quite picture it for now

And as for the explosion AOE thanks I didn’t think that it’s actually simple.

There is a extension called “homing projectile”

I’m confused on how the homing projectile works
Does it still require the firebullet behavior or can I just use the move towards target immediatly?

Also I’m trying to give my rocket a smoke trail using particles but the particles I’m using just stays on the location from where the rocket was fired from and it doesn’t stick to my rocket.

I never used homing projectile extension
But i bet you can use it in tandem with fire bullet extension
AND without it so your choice

As for particle emiter
You need to add emiter to your bullet object when it is fired
So directly after action where you fire bullet you need action to create particle emiter for that bullet
Now you either need to link them with action link two objects
OR maybe it will work just by changing position position of particle emiter to bullet
I do not remember how it should be done
But i let you try before i dig again back into it

As for doing fire bullet homing projectile i think just firing toward position of some object should do the trick

Only thing you would need to use in addition is condition Compare two numbers
And check if it is below some number like 10 it would check if it is below 10 pixels
And if it is you detonate it

I have a particle object but all its doing is this

the black smoke from the gun is the particle that’s supposed to trail behind the rocket

OK i decided to check if it will work and homing projectiles work perfectly fine

Press Z

Bullets when they are 5 pixels below point where they fly will explode and leave explosion object behind which is deleted after animation is finished
This is your AoE effect so you can make it bigger smaller whatever

I did not make event to damage enemies with explosion object but i bet you know how to set it up

Bullets on creation are picking nearest UFO and storing its X and Y position in DesX and DesY variables
And then all bullets move to their DesX and DesY position stored in their variables

Which is position of nearest UFO object when Z key was pressed (when you fired)
So it don’t chase UFO but goes to positions where UFO was

Use forces to make it constantly going forward, and use “Rotate towards position” Set the position to the X and Y of the object that it’s targeting