kill my enemy with a power

hello. How can I kill my enemy when I touch a power? For example: I touch an object and I can automatically kill my enemies

This is how I have programmed the object to be able to destroy my enemies

when I destroy that actor automatically the camera moves up by itself

You mean you can sort of fly around slowly? That’s the default pawn. If you destroy the player, the system will switch to the default pawn.

Yeah, it’s like when I destroy the actor and then kill my enemies, the camera suddenly turns up.

like the star from mario bros, that by touching it I can kill my enemies, that’s what I want

Then on overlap with the star do

1 Like

we are achieving it. but when i get the power up, the enemies disappear immediately. The idea is that I kill them by touching them

Ok, then code as in your first example.

When the player overlaps the star, you can set a boolean to true. ( and off again after 10 seconds ).

Then, when the player overlaps an enemy, destroy them if the bool is true.

1 Like

would you show me pictures? because I am new to this. Thank you

What I want to do is really something complex, but this is the last thing I will ask for and I won’t bother anymore :grin:. Did you see the sequence of how to kill a ghost in pacman? I destroy the big seed, the ghosts change color to blue and I can kill them. After a few seconds they are back to normal. And if I kill them, only their eyes are visible and they regenerate at their base. If you want, I’ll send you my project. But promise, it’s the last thing I need. Thank you :pray: :pray: :pray:

I can tell you how to do the general concept, but not the whole thing with colors and running pacmen :slight_smile: That’s too much :slight_smile:

I have to come back either later or tomorrow though, bit busy at the mo…

1 Like

So…

The power up should be something like

and in the player

in the enemy

This sort of thing.

Now, when the player overlaps the enemies, they know a power up is taking place. So instead of eating the player, they run back to base etc.

1 Like

You are a teacher. You are very helpful and attentive. Thank you

1 Like

hello. how are you? I ask you, these two events, how did you create it?

They are there just as an example, but it would be something like

image

1 Like

I made these nodes but it did not take effect
what am i doing wrong?

this is my main character

my enemy

and the “star” of power is this

My code

image

Your code

image

1 Like

in the search it only appears like this

Avoid placing down nodes with no context. Drag a wire first and then search:

It will save you lots of time and prevents mistakes.

2 Likes