how do i make my enemy disappear when i die
Hey there @Hector40! By disappear, what do you mean? Do you just want to destroy them?
If so, the Destroy Actor node is what you’re looking for! Though you still need a means of calling it from your player’s death event, and for that I just answered a question on my recommendations on how to do that!
To get all of the enemies without casting to them, I just answered a question of how to call the same event on all enemies over here!
Thank you !! I’ll try it and then I’ll tell you the results
That setup is also fine to issue a call for a one time event like that for most cases. However that should only stop their movement if my rudimentary translation is correct, were you trying to destroy the enemies or just stop them from moving (for one frame)?
yes, the idea is that the enemies when they kill me stay still and disappear
This makes me think you do not want to Destroy them, at least not immediately. You probably want to stop them in place and make them gradually disappear. Like an animation? Is that correct?
Depending on how it’s supposed to look like, you could adjust the properties of their material, namely opacity. Or perhaps they can sink into the floor? Maybe we can scale them down until they disappear completely? Could you describe the disappearing act?
Afair, we’re making a 3d Pac-Man clone and it’s the Ghosts (enemies) that freeze in place and slowly fade away upon player’s death. How close am I?
Exactly, but I changed my mind. Better that they all freeze at the same time, I think it will be better. because the one who kills me just freezes, I would like it better if one of them touches me and they all freeze at the same time
Stop whatever is moving them then. If you’re not sure how to, explain how you’re moving them.
Well, stop those 2 methods from executing.
Could you show me through images, I’m a newbie
It would be something close to:
It’s a strange movement method (why does the timer go off so often?), it’s in another language and blurry - hope what I suggested makes sense
great, I’m going to see it. Thank you
It’s a Timer Handle
- right click the Return Value
pin and Promote to Variable
:
Technically you do not need it but it’s good practice.
Btw, promoting to variable works on all data pins in blueprints.
Well, the timer is not connected to anything and has no function. Use the timer that moves your Ghosts.
and how do i do that?
What do you mean? This is your timer:
,
I am assuming this is what moves the Ghosts. The timer moves the ghosts, we need to stop the timer.