Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Spataar on September 28, 2014, 08:08:43 AM
-
Hi all, I'm having issues with the INT Operator not calculating numbers correctly.
I have an FSM that gets two random INT's and then adds them up showing an answer. In certain instances it calculates incorrectly as per below.
This may be a silly question but i just can't figure it out....
(http://i.imgur.com/JOcMICJ.jpg)
-
The variables are probably changing after the operation is done.
Try using some predefined variables, if it is correct then that is probably the case. Maybe a loop in your random generation or something, or some event being fired twice? What else is going on in the context?
-
Thanks, I figured it out - I use an array to shuffle the numbers which then end up overwriting the value. This is ok as I first save it into a separate variable and for my game to work this is necessary.