Need help on limit player action

tmoritz702tmoritz702 Member Posts: 11
edited November -1 in Working with GS (Mac)
How do i set a limit on how many times a action is done. Example, a player only has 10 tries to hit different objects. If player can hit 10 different objects the scene changes, if not, scene resets.

Comments

  • WeswogWeswog Member Posts: 1,171
    Get a integer attribute and set it to 10 and call it limit then go to your player and put in if player overlaps/collides or any other action

    Change Attribute limit to -1

    Then make a rule then change it to attribute and put when limit = 0 reset scene

    Cheers, Weswog
  • tmoritz702tmoritz702 Member Posts: 11
    Thanks, even though it took me a while, it worked. But, is there anyway to have the scene change smoothly instead of right away.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi, If you mean a fade out, then create an actor, make its size the same as your screen and its colour black, then set its alpha to 0.

    In its Rules, for a duration of 2 seconds for instance, Interpolate self.color.Alpha to 1.

    Timer, after 2 seconds go to next scene. (Or then also the opposite to fade up to a reset, destroying the actor, ignoring going to next scene).

    when you're ready to use it, spawn it in position (0,0).

    :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • tmoritz702tmoritz702 Member Posts: 11
    Ok, after testing the game I noticed that the attribute I set for number of hits only works in first scene, when it resets it doesn't work. It's the same scene and everything.

    Thanks, gyroscope. Still trying to get fade to work.
Sign In or Register to comment.