(fnaf clone) how do I make a number stop at a certain number/power?

Koridai011Koridai011 Member Posts: 32
edited February 2015 in Working with GS (Mac)

on my 5 nights at freddy clone, I was make a power supply every time use used doors long the power will go off. but unlike fnaf where you have to wait for the next day to get your power back, my doors can regenerate if not using them. anyway, the power keeps adding greater than 100. how do I make it stop doing that?

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2015

    @KoridaiGames said:
    on my 5 nights at freddy clone, I was make a power supply every time use used doors long the power will go off. but unlike fnaf where you have to wait for the next day to get your power back, my doors can regenerate if not using them. anyway, the power keeps adding greater than 100. how do I make it stop doing that?

    Place the rules that control how power is added into another rule that says: When power is < 100.

  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291

    Hey @KoridaiGames,

    try this:

    • min( game.power +1,100)
  • Koridai011Koridai011 Member Posts: 32

    @Socks said:

    that will take to long for me to text the rule for you. and i cant bring up an image. sorry

  • Koridai011Koridai011 Member Posts: 32

    @KillerPenguinStudios said:
    Hey KoridaiGames,

    try this:

    • min( game.power +1,100)

    hey it works thanks

  • Koridai011Koridai011 Member Posts: 32

    Wait wait, i still have a another problem. if i close one door it drops 95 and back to 100 repeatidly. but if if close two door its fine. so i still need help

    when my doors close its: game.power to (game.power-5)
    and
    when my doors open its: game.power to min(game.power+1,100)

  • SocksSocks London, UK.Member Posts: 12,822
    edited February 2015

    @KoridaiGames said:
    that will take to long for me to text the rule for you. and i cant bring up an image. sorry

    Easter egg chocolate trousers.

  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291

    @KoridaiGames said:
    Wait wait, i still have a another problem. if i close one door it drops 95 and back to 100 >repeatidly. but if if close two door its fine. so i still need help

    when my doors close its: game.power to (game.power-5)
    and
    when my doors open its: game.power to min(game.power+1,100)

    Well the reason why is because you still have one of the doors open which is triggering the rule to add while another door is closed which is triggering the rule to subtract.

    What exactly do you want to happen when both doors are closed; when both are open; and when one is a pen and one is closed? 3 different things could be happening!

  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291

    @Socks said:
    Easter egg chocolate trousers.

    Now those sound delicious!!!

  • SocksSocks London, UK.Member Posts: 12,822

    @KillerPenguinStudios said:
    Now those sound delicious!!!

    Yes, indeed, with marshmallow pockets too ! :smile:

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @Socks said:
    Easter egg chocolate trousers.

    :D no ™ on that @Socks? There is not even a reference to it in all of Google!

  • SocksSocks London, UK.Member Posts: 12,822

    @Hopscotch said:
    :D no ™ on that Socks? There is not even a reference to it in all of Google!

    We've had to keep it secret, you know, in case the government are watching us.

  • Koridai011Koridai011 Member Posts: 32

    @KillerPenguinStudios said:
    What exactly do you want to happen when both doors are closed; when both are open; and when one is a pen and one is closed? 3 different things could be happening!

    Well, I'm on vacation right now. Talk to you later

  • Koridai011Koridai011 Member Posts: 32

    i've got it now,thanks!

  • chrisjames0555chrisjames0555 Member Posts: 7

    That's nice ........

Sign In or Register to comment.