Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nabilfx on November 02, 2015, 08:34:43 AM

Title: Help int compare
Post by: nabilfx on November 02, 2015, 08:34:43 AM
I have an a global int variable of 7  that means 7 lifes.  The i have a Int compare with the Int variable, in integer 1, i put the int variable of 7 life, and in integer 2, i put a number 0. Everything is ok when i play the game, but when the int variable hit 0 trigger the event, i stop the game a play again, but the int variable of 7 lifes does not return to 7 value, stay in value 0.

Why this happend?
Title: Re: Help int compare
Post by: Lane on November 02, 2015, 10:43:31 AM
Sounds like when the level starts you need to check if the Lives variable is 0 and then set it to 7.
Title: Re: Help int compare
Post by: nabilfx on November 02, 2015, 02:26:41 PM
Can i use, Int clamp, to specified the int value every time starts the game, ok?  is working
Title: Re: Help int compare
Post by: djaydino on November 02, 2015, 02:55:18 PM
Hi,
"int clamp" is to limit a value so it can not go higher or lower that the values given in min/max.

you can use "set int value" to set the global int back to 7.