Announcement

Collapse
No announcement yet.

Box trigger that counts how many times a player has entered it?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Box trigger that counts how many times a player has entered it?

    Hello. I am building a 2D platform level and I need a box trigger that counts how many times the player has entered it. This value does not need to be seen by the player, but it does need to be stored to be used as a 'result' at the end of the level, for example "Your score for this level is 5".

    How would I go about achieving this, I don't seem to be able to find any relevant tutorials.

    #2
    You register an event on the box trigger that's called OnBeginOverlap or something along those lines. If the Box Trigger doesn't have this event then you just add a collision box as well which uses the event.
    You can register the event by picking the box in the component list and then right click in the blueprint view and start typing "Overlap". It should show the event there.

    Then you do whatever you need to do there.

    Comment

    Working...
    X