Money Script

Paras4444
25 Aug 2018, 10:01I'm making a game using the money feature, and I want the game to give the player a message when the money counter hits zero. Anyone know what script to use?

NecroDeath
25 Aug 2018, 10:36Object counter, increase or decrease every time the player receives or spends money. If counter = zero then print message.
mrangel
25 Aug 2018, 11:26For the player object, add an attribute (I think you can do this on the 'Attributes' tab) named changedmoney
, and make it a script. This script will now be run every time the player's money changes.
You can make it something like:
if (this.money = 0) {
msg ("You have no money!")
}