|
-
Variable adds when going to frame??
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
-
_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
-
Ok thanks... if I wanted to subtract 1 would it be
_parent.day --= _parent.day*1
? thanks.
matt
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|