Linking an effect to only the latest created object instance

Hello, I was wondering if I could do an attack type like megaman in my game for my main character. For example when key “a” pressed, create a ball in front of character then create a particles effect and linking them to each other and making their coordinates same. I want particles effect to follow each ball attack but my code only links first created ball to the newly created particle effect. Is this the right approach for this? Your help is really appreciated.

This code’s outcome is the same as the one in the above

Are you familiar with the “stick objects to others” behavior? It allows you to stick objects together.

(If not click [add behavior] for the FX object, click [search new behaviors] tab. Search for it, [install in project] and then click the new behavior to assign to object]

This creates an object. creates an FX object using a point on the previous object, rotates the fx, sticks the fx on the previous object and then adds a permeant force.

Edit: both objects also have the “destroy when outside of the screen” behavior set to 200.

1 Like

Thanks I will use the extension for this and post the result soon :slight_smile:

1 Like