this guide will tell you how to make a money system, that includes cents.
it only covers cents, once you get to dollars, try a different system, pal.
materials
-counter
-trigger
-property
-game overlay
-notification
-lifecycle
place 'em down.
property settings
name: coins
type: number
default value: 0
scope: player
when value changes: coin.change
trigger settings
when triggered: coin.gain
collision enabled: yes
image
overlay settings
overlay type: text
show when receiving on: coin.gain
block:
when receiving on coin.change
block
i wasn’t writing this down
the text basically states that at ten coins it doesn’t have a hundredth place
at one hundred et cetera, and so on and so forth
you can just copy, no extra stuff
image
counter settings
starting value: 0
increment when receiving on: coin.gain
update property: yes
property to update: coin.total
final result
very easy
removing coins on player knockout
lifecycle settings
event: player knocked out
when event occurs: knockout.occurence
trigger two settings
make a second trigger
trigger when receiving on: knockout occurence
now wire to the counter
deincrement the counter when triggered.
again, to remove two coins, then just “channel comma channel”
solving negative coins
when the payer loses coins on knockout or whatever…
they can move to negative coins.
this looks strange to say the least.
it looks kind of like 0.0-1¢
to solve this problem, use the code:
image
of course if you have more coins lost, just substitute the coins,
the ones turn to twos, threes, whatever you wants, et cetera.
adios
the guide is over