How do I…
Make particles disappear 0.5 after they hit a wall but if staying on a wall then it won’t disappear?
What is the expected result
Ideally, the particles should run for 0.5 seconds once hitting a wall and every time thereafter. However, if the ball is on a wall for a long time then the particles shouldn’t disappear straight away and should remain constant unless the ball is being dragged or is hitting the wall for a 0.5 second particle effect.
What is the actual result
I had solved this a couple days ago but after editing everything, I’ve forgotten what I originally ‘coded’ for the above explanation to work. At the moment I’ve got particles hitting each wall and sticking to where it lands which is making the game lag and not what I’m intending to do with the game.
Project files (optional)
Will give project files if it proves helpful to solving the problem.
I do apologize for all my questions. I’m a very new casual indie game developer and do know that I do try my absolute best to get things working before I ask for help which includes looking at the wiki, tutorials, etc.
you can simulate the particles with this action:
I’m not too sure that’s going to solve my issue sadly.
What I want is for the ball to show the particle effect if hitting the wall and if not then don’t show it. Ideally I’d also want it to not show the particle effect if the ball is still.
found this simple video I hope it helps : D
I think there may be some confusion on some of the replies here.
To speak to your original question: Particle emitters are the objects you apply logic to, and they create individual particles in the scene. Particles are not controllable via logic after creation.
Unfortunately this means the particles themselves cannot have their direction/logic changed after creation.
What you could do is set up events that update the particle emitter settings once the ball is on the wall. It will affect any new particles, but not affect existing ones.
That’s what I’m struggling with a bit.
Potato-Coder was helpful with the above Short Video but instead of deleting the particles a second after hitting the wall, it just stays constant which causes massive lag and I’m not sure how to fix it. I’ve spent ages trying but nothing seems to be working.
Thank you for that Potato-Coder.
It does work but unfortunately once the ball bounces off the wall, the particles stay where the ball hit the wall.
I’m still trying to think of how I can get the particles to delete if off the wall.
I’m not on my laptop at the moment but do you think if I used: If ball not touching wall then hide particles but if touching wall then show particles and create an object?
Or would that not work? I’ve tried literally everything that I can think of to get the particles to disappear when not hitting a wall.
It frustrates me as I had this working a couple days ago before I did all the edits.
I figured it out. I’m so happy and I’m so relieved. Now I can sleep peacefully despite it being 5:05am lol.
what was the solution?
Sorry for the late reply, I’m currently on holiday and don’t have my laptop with me.
I’ll share the events below once I get home on Thursday, just in case others have a similar problem to me and want an answer to it.
Hope this helps anyone who has or will have the same issue as I had.