Author Topic: Another little VCE question.  (Read 380 times)

I just figured out how to Make a little money mod thingy with VCE. Now,how do I make it so when you run out of money and try to buy somthing,it does not go negative. Normalliy it will go: You ran out of money. -50 left.

How can I make it so the number wont go negative?

Make it so when you click the buy button to activate the VCE events you do:

Code: [Select]
Onactivate -> Client -> Ifvariable -> Money >= 1
OnVariableTrue -> Client -> Vcemodvar -> Money -1
OnVariabletrue -> Client -> Vcemodvar -> Item +1
OnVariabletrue -> Client -> Centreprint -> Transaction Successful
OnVariableFalse -> Client -> Centreprint -> Out of money

With this, it won't buy the item or indeed even trigger the events if you have below 1 cash. Therefore you can't go negative

Make it so when you click the buy button to activate the VCE events you do:
Edit: If you pay 5 money for someything, the >= should be 5.


Wait.. That des not work...

I did exactly as you sad,Did not work correctly...

Hmm...