First time using money

CheshireTiger
05 Aug 2021, 00:22

Ok so id like an npc to coment if player is broken or under $50 when spokem to. but i dont see an option for meney under if menu...

It is like an atribute? How whould i go about this?


mrangel
05 Aug 2021, 11:26

If you're using the default money system, it's the money attribute.


CheshireTiger
05 Aug 2021, 12:21

So it whould be

if (player.money = 0)

And

if (player.money <50)

?


mrangel
05 Aug 2021, 17:33

That looks right to me.

Although it's better to use game.pov instead of player. For most games it probably doesn't make a difference; but if you get into the habit of using 'player' in your code, then when you do make a game that has a problem, you'll probably spend hours debugging because you can't find the one place where it's wrong.