Actor to pawn blueprint interaction.

Hello there,

first of all thanks for all the help with the recent post. My understanding of UE blueprints is certainly a bit better now. However, I’ve encountered another problem, that I cant solve on my own.

I would like to blueprint inside the character’s BP, to check for the visibility of a particle system that is in inside of a pawn. And if that is visible I would like the player to take certain amount of damage if he is moving or falling at that time? How would you guys do that? If I missed a topic and it already exists please just send me a link, but I’ve searched for quite a while and I cant find anything useful(Could be because of the lack of understanding of the BP mechanics).

Thank you for your answers. Have a good day!

Does your character collides with that pawn?

Nope he doesn’t. I figured I could also check for visibility of that certain particle system inside of the pawn and make a connection there right ?

In player character - damage only if he’s moving or falling:

](filedata/fetch?id=1786501&d=1594393740)

In pawn with the particle system - apply damage to player only if particle system is visible:

](filedata/fetch?id=1786502&d=1594393747)

Questions:

  • visible or emitting? Which one?
  • character: player or other?

Thanks a lot man! Visible will do.

Hey man,

I’ve tried what you’ve sent, and for some reason it doesn’t work, neither does it print any string. Do you maybe have any idea, why could that be ?

What did you connect to the branch in the pawn?

Red Light is a red particle system I’ve got set in the pawn. And when it is visible I want it to hurt the player for 20 points if the player is moving or jumping per second for example.

My visibility state function is set up like that. So that each light is visible for a certain amount of time. Hopefully I am clear with my posts. For example: My character has a 100 units or 1 of health. Now this beacons have three different fire colors, green yellow and red. And the player is able to move when green and orange are visible, but if red is visible I want my character to take damage for each second he is moving while the red light is visible.

The problem here is that my begin play is already used for set timer by function name, which indicates my next state change(beacons changing colors). I’ve tried that using event tick, and still it doesn’t work. I hope it doesn’t take too much of your time mate. Thanks a lot for the help!

When red light on, start a new timer, in 1s loop, to apply the damage. When others lights on, clear that timer:

Hey man, we did it. I mean you did it! It works but now it hits me 5 times at once, and I cant explain why. I had to use timers by function name, as you can see in the screenshots bellow. Do you have any idea why this would happen ?

In RedDamage function, no need for timer and branch:

](filedata/fetch?id=1786571&d=1594403131)

Hey man, I’ve deleted those nodes, but it still hits 5 times at once. I figured it might also be something in the player BP, because we never set to just hit him once per second of moving while red ? This is just a speculation, might be something else. Thanks for all the help!

What happens if you replace the set timer with a simple print string:

1.jpg

Man, I’ve figured it out. I’ve added delay node to the character blueprint, so he can only take that damage once every second! Thanks a lot, now it works just fine!