How to make it so when some actors collide with floor 3 times, the game will end? (change scene)

justinodunnjustinodunn Member, PRO Posts: 226
if any three actors collide with the floor 3 times, i want the game to end.. how to do that? thanks!

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2014

    Hi @justinodunn One way: make an integer attribute, lets call it NumColl, leave it at 0 to start.

    --Adding to your collide rule:

    Rule: When actor overlaps or collides with actor of type floor
    Rule: When NumColl <3
    Change Attribute NumColl to NumColl+1
    Otherwise
    ---end game sequence, whoever you have, maybe:
    Change scene Game over

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

  • justinodunnjustinodunn Member, PRO Posts: 226
    thank you!! but any idea how to display the number of times it collided with floor for the user? cheers :)
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Sure, make your actor to display the number of times, place it on-screen; and in its Rules put a Display Text behaviour.

    Then via the expression editor, select NumCol as its value. :-)

    Btw, have you gone through the GS manual, Justin? you can pick up a lot of tips and tricks from it. Can be found under Help tab at the top of this page. Good luck!

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

  • justinodunnjustinodunn Member, PRO Posts: 226
    Ahh of course! didn't think of that :P Yes i did go through the manual :) Thanks for your help!
Sign In or Register to comment.