Hi, good day!
So this is my problem. I created this shooting game with “Coin Loot” so if every time the player is in collision with a loot (coin) then it gives him 500 coins. So if the enemy drops a double loot (coin), and the player is in collision with the loots then it still gives the player 500 coins even though the loot is doubled. It’s supposed to give the player 1000 coins. How can I fix this? Thank you.
If the “player” in collision with “coinloot” then delete “coinloot” and give the “player” 500 coins.
Do you have 2 objects, one for coin loot, one for double coin loot?
If not, I suggest you make a double coin loot object (even if they look the same). It’ll make your game flow easier to read and work with.
There’s also a chance that the enemies will drop more than two coin loot. If the loot is in the same coordinates or position. The double or triple or more loots won’t work.
You should separate multiple coins. It lets the player know this visually, so the coin increase isn’t a surprise.
Also, with this new information, you should change your event to something like:
If player in collision with "coinLoot" then give the "player" count(coinLoot) * 500 coins and delete "coinLoot"
Thank you so much this is what I am looking for :))))
If the player should be able to collide with several coins at the same time, you can use the “for each object” as shown in the platformer tuturial.