Quick question start/finish character

jonneyjonney Member Posts: 14
edited May 2012 in Working with GS (Mac)
Hello,

before i start my game i would like some help with how i would code this certain part, i was wondering if its possible to do what i am planning.

i have a character which starts and finishes the game by tapping him to start and tapping him to finish but once he has been tapped to start the game the main game will begin and you will have to complete the screen task. then once done you tap him to say you've finished. how is this part coded to make him tap to start and tap to finish so that he would know the game is complete and moves onto the next level?

thanks for everyones help on game salad

Best Answers

  • v00d0v00d0 Posts: 143
    Accepted Answer
    You should create a boolean variable and call it task (or something else u like) and say to the actor that control the tasks to change this variable to true when the final task is completed, then create a rule to the main actor and inside u say that if the actor is touched and the variable task is true then change scene otherwise do something else like popup a message or gameover..
  • Braydon_SFXBraydon_SFX Posts: 9,273
    Accepted Answer
    Not if I understand correctly.

Answers

  • jonneyjonney Member Posts: 14
    but I'm going to have the ball so its flicked into the air so would this make any difference?
  • jonneyjonney Member Posts: 14
    so if for example if the last object is off the screen and they tapped the ball to say they were done is this the same way i would do it because i don't want it so they can tap the ball anytime because they have to clear the screen first. hope this has made it clearer sorry if i have confused some people.

    thanks
  • v00d0v00d0 Member Posts: 143
    edited May 2012
    ye but it's easy to do! if you have 5 task to complete for each scene (for example) then let's say i've to:

    1) kill a monster
    2) drop a ball
    3) click on a box

    then ill create 3 boolean variable and i say to each actor to:

    1) when monster is destroyed change variable: task 1 to true
    2) when the ball is dropped change variable: task 2 to true
    3) if the box is clicked change the variable: task 3 to true.

    [ of course, if you want the player to do things in order, is the same thing; put a rule inside (for example) the ball, where u say that the ball can't be dropped, if the monster is alive so: if task1 is true then drop the ball otherwise do nothing]


    then move to the main actor and say if touch is pressed: start game.
    then another rule: if touch is pressed and game task 1 and game task 2 and game task 3 are true then change scene (so the level is completed) otherwise to somethingelse.

    so if you try to touch the main actor after the start and the variables (task1,2,3) aren't true, something will inform the player that he have to complete all tasks before move to the next level.
  • jonneyjonney Member Posts: 14
    @v00d0 Cheers for that reply really helped me was confused at first couldn't get my head around it :)
  • v00d0v00d0 Member Posts: 143
    :)>-
Sign In or Register to comment.