playMaker

Author Topic: Help int compare  (Read 1005 times)

nabilfx

  • Full Member
  • ***
  • Posts: 186
    • View Profile
Help int compare
« on: November 02, 2015, 06: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?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2488
  • Yup.
    • View Profile
    • Cleverous
Re: Help int compare
« Reply #1 on: November 02, 2015, 08: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.

nabilfx

  • Full Member
  • ***
  • Posts: 186
    • View Profile
Re: Help int compare
« Reply #2 on: November 02, 2015, 12:26:41 PM »
Can i use, Int clamp, to specified the int value every time starts the game, ok?  is working

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4648
    • View Profile
    • jinxtergames
Re: Help int compare
« Reply #3 on: November 02, 2015, 12: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.