So I have 3 differant fireball sprite objects with three different names being created on the fifth frame of another objects amamation and they have a variable that adds a force. It took a while to figure that out because I wanted them to move at different angles. For some reason all three would follow whatever was on top in the list. I had to set a timer and have them launch .1 second apart. Anyway, after I got that to work I wanted to create 3 particle objects to follow. So I created 3 different particle objects in the same event and had a constant event to track the position of each fireball. It works one time. After that it just shoots fireballs without the particles. While I was messing around trying to get it to work, I set a timer to delete the particles after 1 second. The particles would work every time. So I thought I could time it up with the reoccurring fireball event but I canāt get them to recycle the event if they move off screen.
I think itās just buggy because I have a lot going on in the event. Is there a better way of doing it?
I simplified the event to try and work this out. I deleted two of the fireballs. Still, with only one ball firing, the particle emmiter only recognizes the event the first time. Is the particle emmiter bugged or should I not expect it to act like others objects?
Hi, in your first event you should link your Fireball with the emitter (with the ālink two objectsā action). When you move your emitter you need to use a āFor eachā event for the emitter and as a condition you have to ātake into account all FireBall linked to emiterā. This should move your emitter with the FireBall.
Here is a quick test project that shows what it looks like:
Thanks for the response. Iām learning something new every day. Havenāt used link objects yet. Will definitely try this now. Also, I was messing around with it today and found the copy and object multiple times action. So I have the fire ball actually make 3 copies. Is there a way to have copies of the particle emmiter and have them linked to the copies of fireballs.
To give you a better idea what Iām trying to do. Iām making a Mario game and am trying to create the piranha plant that pops out the tube and shoots 3 fireballs. I have the timing and movement and placement worked out. I just need to get to emmiters to follow each fireball and have to plant fire in the direction of mario. Is that something Iām gonna need x raycasting for?
is. I woud use a āRepeatā event for creating your 3 fire balls. You can link and move the particles as shown in the example.
Raycasting is actually not necessary. For the plant to shoot the fireballs you could use the ādistance between two objectsā condition (for example: if Mario is 100px or less to the plant, plant fires balls in direction of Mario).
So tried what you said but couldnāt get the particle emmiters to follow. Also, the repeat function spawns all three instances in the same spot. Thereās a ācopy objectā action I messed with and got it to spawn 3 fireballs in the position I want them to start but they just get closer together as they reach their target. I want them to spread out and donāt know how to set position of multiple instances that are created at the same time. Iād like to force the top and bottom fireballs to the same position as the middle is going but would like to tweak the Y axis on them. One at Mario.y()-20 and Mario.Y()+20 for the other.
I got it to work using 6 different objects for 3 fireballs. I would have like to of used the clone action and not have so many different objects but I canāt get it to work.