First time using money

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?


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


So it whould be

if (player.money = 0)

And

if (player.money <50)

?


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.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums