I’m running into a problem regarding the particle emitter
I have the object position itself to a bullet, however everytime a bullet is spawned, it also spawns another particle at the top left, I dont know what is causing it and I cant get it to go away, I have set the bullet and the particle’s life spawn to an x amount of seconds but I dont want that to be the ultimate solution
Perhaps you could show a screenshot of the events for your particle emitter?
well everything I said is just it, when the bullet is fired there is an action that will spawn the particle at the center of the bullet, and another action that is active all the time that sets the position of the particle to the center of the bullet so the particle follows the object.
Hi That position looks like 0,0 - so it looks like you’re sending it to a position that hasn’t been recognized - perhaps when the object doesn’t exist
Hi - What might be happening is that - On that initial frame - the bullet hasn’t been created yet by the bullet behaviour and so when you create the trail and change it’s position, the bullet doesn’t exist and so it sends the trail to 0,0
so you need a condition to check if the bullet exists and hide the trail if it doesn’t (number of instances on the scene>0)- or create the trail when the bullet exists. If there’s more than one bullet then you’ll need to link the trail to the bullet or number it and the bullet and use a for each.
Edit…one thing you can do is use a scene boolean ‘create trail’ to create it on the next frame …fire bullet event set create trail to true and above the fire bullet event if create trail true then create trail and turn create trail to false
I wouldn’t use fire bullet behavior myself if I was doing this …I would just create a bullet object and permanent force at angle …and use variables like ammo and reload timer etc
This is close but not exactly right. The bullet has been created, but it hasn’t been picked. FireBullets doesn’t work like the “create an object” action, which automatically picks the created object for the next actions. Another consideration related to that, is the FireBullets extension has internal checks to prevent shooting, such as a cooldown. This means that your event will be creating Trails even when no Bullet was created.
There needs to be a condition to pick the Bullet to operate on. There’s a few ways to do this. One could be to give Bullet a variable such as “initialized”. Make a condition to check if this variable is 0, with actions that create the trail and then set the variable to 1 (to avoid refiring).
Side note, you have an empty condition with an action to move the position of Trail to Bullet. This is going to fail as soon as you have more than one bullet… you don’t have anything linking the Trail to the Bullet. I would recommend using the Sticker behavior instead. But if you don’t want to do that, you’ll need a condition there as well (Trail is linked to Bullet, or something)

