How do I detect on collision event?

0 favourites
  • 2 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • i have a plataform changing every 5 seconds, is a sprite whit 2 frames, frame 1 is just the plataform, in frame 2 is the same plataform whit spikes, if the player jump in the plataform on the frame whit spikes, the player gets hurt, thats fine, but if the player stay in the plataform whitout spikes and the frame change the spikes apear but nothing happen, but if i move the player the collision is detected.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You have to check if they are overlapping.

    If player overlapping Platform

    -if animation frame = 1

    -If DmgCD is false

    --->do the dmg

    If Platform.DmgCD is false

    -> Wait 1s*

    -> Set DmgCD to True

    The DmgCD is a boolean instanced variable that you can determine how often the player can get hurt by that platform instance. So each platform have a different cooldown, meaning you still can suffer dmg from another platform.

    *you can use a Wait or you can set a Timer. If you use Timer you don't need to use the variable DmgCD. You just need to check if the Timer isrunning or not.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)