Why doesn't collect all the 30 coins?

0 favourites
  • 4 posts
From the Asset Store
30 Fantasy Monsters
$4 USD
50% off
30 high-quality 2D monsters. This asset is perfect for a side scrolling game, or even a turn based RPG type game.
  • Why doesn't collect all the 30 coins?

    dropbox.com/s/7n64zhj0c7tes0h/collect-coins.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should pick with the coin, change the overlap event to 'coin on collision with player'.

  • Yes you can change the event to the collision condition. But just to make sure you understand how events work:

    The game runs through "player -> is overlapping coin" every single tick! (even without the "Every tick" condition)

    Means, if there's a tick, in which multiple coins overlap with the player at the same time, the condition is true -> but only 1 coin will be added, while all overlapping coins will be destroyed.

    So you would either need to change it to:

    ->For each coin --> player is overlapping coin

    As a nested event, to make sure that every single coin triggers this event if multiple coins are overlapping the player.

    OR

    instead of "Add 1 to coins". You could change the "1" to "coin.PickedCount". So if multiple coins are overlapping, it will be increased by the current overlapped value.

  • The game runs through "player -> is overlapping coin" every single tick! (even without the "Every tick" condition)

    Means, if there's a tick, in which multiple coins overlap with the player at the same time, the condition is true -> but only 1 coin will be added, while all overlapping coins will be destroyed.

    I didn't know it worked like that

    Thank you very much, it helped me to continue developing the game...

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