Hello im newbie here, i want to ask how to add value to life every 5 coin destroy / get on my construct2 school project
on every 1 coin get it will add 1 value to coin , how can i do every 5 coin it will add 1 value to life . thank you
Develop games in your browser. Powerful, performant & highly capable.
Ok here:
On Player Collisions with Coin → Add 1 to CoinHealthCount(GB) AND Add 1 to CoinCollect(GB)
IF CoinHealthCount == 5 → Add 1 to PlayerHealth(GB) AND Reset CoinHealthCount to 0
Make sure to do the right order of actions the way I showed you.
Use the module when you get the coin.
Coin % 5 = 0 -> Add Life
This means that every time the number of coins is divisible by 5 and the remainder is 0 you add life. (5, 10, 15, 20...)