;

PDA

Click to See Complete Forum and Search --> : Variable adds when going to frame??


mprimmer
09-10-2004, 03:20 PM
Hey I am making an rpg and I want it so that when it enters a frame on the clock (the last one) it adds 1 to the number of days. I have

_parent.day += _parent.day*1

Butit does crazy stuff when i try to add it on like everything but just add 1 number. Can someone please help me? thanks alot.




Matt

theallan
09-12-2004, 07:16 PM
_parent.day++; will do it

At the moment you are adding the current value to itself, so if you start at 1 you'll get:

1 2 4 8 16 32 64 etc...
Just use the ++ increment.

A

mprimmer
09-14-2004, 04:31 PM
Ok thanks... if I wanted to subtract 1 would it be

_parent.day --= _parent.day*1
? thanks.







matt