# Can someone help me with the spike trap? 

**URL:** <https://forums.unrealengine.com/t/can-someone-help-me-with-the-spike-trap/2689451>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [January 3, 2026, 10:00pm UTC](https://forums.unrealengine.com/t/can-someone-help-me-with-the-spike-trap/2689451 "2026-01-03T22:00:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Superpan21DX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Superpan21DX](https://forums.unrealengine.com/u/Superpan21DX)\
**Post date:** [January 3, 2026, 10:00pm UTC](https://forums.unrealengine.com/t/can-someone-help-me-with-the-spike-trap/2689451/1 "2026-01-03T22:00:28Z")

</div>

Right now, I am making a Sonic game. In Sonic games, when Sonic gets hit by a spike trap, he’ll lose rings. Hit again, he’ll lose a life. I want it to be just like the Sonic games. Keep in mind that I am using Blueprints. I just made the spike trap using meshes, and I am doing the functions.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/1/f11f366786172233ba5991c1ac376f57a72e5e81.jpeg)

Here is the setting so far. I also want to add some invincibility to this.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/8/e58310a67392a79ccb776735799efa7495d8951e.jpeg)

I’m putting this functionality in the BP\_PlayerCharacter blueprint.

I even made a ring functionality for this.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/e/b1e69d751de9a7773100d5b520d19f5614af0052.png)

Can somebody help me here?

---

<div class="post-metadata">

**Author:** ![MajorT](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/majort/32/1219796_2.png) [@MajorT](https://forums.unrealengine.com/u/MajorT)\
**Post date:** [January 4, 2026, 12:07am UTC](https://forums.unrealengine.com/t/can-someone-help-me-with-the-spike-trap/2689451/2 "2026-01-04T00:07:39Z")

</div>

Hey!  
I strongly recommend you to use the already built-in “damage system”.  
Each actor can receive damage (if `CanBeDamaged` is true) with the `Apply Damage` function.  
When an actor received any damage, the event `AnyDamage `of that actor will be called.

What that means for you:  
In the spike trap, apply damage to the overlapped actor.  
In your player character, override the `AnyDamage` event and implement your damage logic.  
For instance you first subtract the rings by one, if no rings are left, subtract the damage from the players health.  
Once no health is left, implement some death mechanic.
