Checkpoint HELP! **FIXED**

rassy9516rassy9516 Member Posts: 13
edited February 2012 in Working with GS (Mac)
Hey, I am making a checkpoint which says:

(Checkpoint "box" that have Position.X=380 and Position.Y=40)--When collide with actor Ball Player, change attribute game.Checkpoints to 1 and save attribute game.Checkpoints to key: check1.

(The button you press after you die (restarts last scene))--When actor is pressed and the attribute game.Checkpoints = 1 load key: check1 -attribute game.Checkpoints.

(Ball Player)--When attribute game.Checkpoints = 1, change attribute self.Position.X to Position.X=380 and change attribute self.Position.Y to Position.Y=40.

So here is the problem, I don't know how to get the ball player to spawn in the "checkpoint box actors" position X and Y after you have pressed the restart button. I just wrote up "Position.X=380" and "Position.Y=40" to make you understand what I mean...

Thank you for your help(s); and if got a way to make a checkpoint like this please post it! :)

Comments

  • UnicornInvasionUnicornInvasion Member Posts: 301
    Ok Play the ball character on the spawn. Double click the character and unlock the padlock. Make the alpha 0. Create a Rule.

    if Attribute game. checkpoints=1 then

    Spawn Actor Behaviour.

    Now get the actor that starts at the beginning of the scene. Double click and Unlock padlock. Create a rule.

    When overlaps/collides with checkpoint

    then Destroy.

    Hope that helped.

    UnicornInvasion, Any questions comment back.
  • UnicornInvasionUnicornInvasion Member Posts: 301
    OOPS INSTEAD OF SPAWN ACTOR BEHAVIOUR MAKE IT

    Change Attribute self.colour.alpha to 100
  • rassy9516rassy9516 Member Posts: 13
    Ok thank you! I will try that.
  • rassy9516rassy9516 Member Posts: 13
    Haha, I think you tricked me there. Because that will definitely not work!
  • UnicornInvasionUnicornInvasion Member Posts: 301
    Why?
  • rassy9516rassy9516 Member Posts: 13
    edited February 2012
    ? haha, that will only change the "alpha" color..
    Maybe you misunderstood.
  • rassy9516rassy9516 Member Posts: 13
    But if you did not, thank you anyway.
  • rassy9516rassy9516 Member Posts: 13
    Actually you gave me an idea, thanks.
  • UnicornInvasionUnicornInvasion Member Posts: 301
    ...
  • MotherHooseMotherHoose Member Posts: 2,456
    gameAttributes: two real-type:   last√ptX ; last√ptY … and one Index type: √ptCount

    on checkPoint actors:
    Rule: when
    Event: overlap or collide with ball
    -changeAttribute: game.last√ptX To: self.Position.X
    -changeAttribute: game.last√ptY To: self.Position.Y
    -changeAttribute: game.√ptCount To: game.√ptCount+1

    on your ballActor:
    Rule: when
    Attribute: game.√ptCount > 0
    -changeAttribute: self.Position.X To: game.last√ptX
    -changeAttribute: self.Position.Y To: game.last√ptY

    or spawn: Position ➨ game.last√ptX ⬆game.last√ptY Relative to: scene

    @};- MH
  • rassy9516rassy9516 Member Posts: 13
    edited February 2012
    I figured it out, this is what you need to do:

    * Make an integer attribute called "Checkpoints" and make an actor called "checkpoint".
    --In actor "checkpoint", make it say: When overlaps/collide with Ball Player (or of course your player*) change game.Checkpoint = 1.

    *Go into the "restart scene" button and make a new rule.
    --Make it say: (When ALL conditions are vaild) When actor (restart button) is pressed and attribute game.Checkpoint = 1, change game.Checkpoint to 2.

    *Go into "Ball Player" (or your player*) and make a new rule:
    --Make it say: When attribute game.Checkpoint = 2, change images to *any invisible image, make it in your editing program for example Photoshop* and destroy this actor.

    *Go into actor "checkpoint" again, create a new rule:
    --Make it say: When attribute game.Checkpoint = 2, spawn Ball Player in front of actor.

    That is how you make an easy checkpoint! Hope this helps other people to :D
  • rassy9516rassy9516 Member Posts: 13
    edited February 2012
    Ahh, thank you MotherHoose. Did not see your comment before I posted mine!
    Will try that later.

    cheers
  • MotherHooseMotherHoose Member Posts: 2,456
    edited February 2012
    who knows? … Jack … we just trying everything!
    and, reading some of the comments … makes me wonder what is broken … ROFLMA

    speak up if you have another possible solution …

    @};- MH
  • LeonardDeveloperLeonardDeveloper Member Posts: 4,630
  • rassy9516rassy9516 Member Posts: 13
    Yeah, it is "fixed" or you can say that the problem is sovled yyyy
  • allc1865allc1865 Member, PRO Posts: 777
    I figured it out, this is what you need to do:

    * Make an integer attribute called "Checkpoints" and make an actor called "checkpoint".
    --In actor "checkpoint", make it say: When overlaps/collide with Ball Player (or of course your player*) change game.Checkpoint = 1.

    *Go into the "restart scene" button and make a new rule.
    --Make it say: (When ALL conditions are vaild) When actor (restart button) is pressed and attribute game.Checkpoint = 1, change game.Checkpoint to 2.

    *Go into "Ball Player" (or your player*) and make a new rule:
    --Make it say: When attribute game.Checkpoint = 2, change images to *any invisible image, make it in your editing program for example Photoshop* and destroy this actor.

    *Go into actor "checkpoint" again, create a new rule:
    --Make it say: When attribute game.Checkpoint = 2, spawn Ball Player in front of actor.

    That is how you make an easy checkpoint! Hope this helps other people to :D
    @rassy9516, mine didn't work. Do you place your "checkpoints" actor in the scene?
  • rassy9516rassy9516 Member Posts: 13
    @allc1865, It is so long ago since I have worked with this project that I am not sure if I placed the "checkpoints" actor in the scene.

    But, when I read the guideline I wrote I think I must have placed the "checkpoints" actor onto the scene (which can be many checkpoint actors, for more checkpoints); because I think I thought that when the player actor collides with the invisible, lets say "checkpoint1" actor, it will change an attribute (game.Checkpoint = 1) so we know that the player have reached "checkpoint1", and when the player enters the "gameplay scene", the player will spawn in front of the "checkpoint1" actor if a rule is valid, which could say: if the game.Checkpoint = 1 then this actor, "checkpoint1" actor, will spawn the player actor in front of itself (checkpoint1 actor).
    And with this "setup" we can easily add allot of checkpoints, and for example make a start point actor spawn an actor in front of itself if the attribute game.Checkpoint = 0. :) (I have not worked with GameSalad in almost 1 year, so I hope I explained the "logic" of it in the right way, hehe)
  • allc1865allc1865 Member, PRO Posts: 777
    Okay. Thank you for replying. I'm just trying to get my checkpoints to work, and this is the article I came across. I try what you said.
    Thanks again! :)
  • allc1865allc1865 Member, PRO Posts: 777
    sorry about that -- *I'll try*
  • rassy9516rassy9516 Member Posts: 13
    edited October 2013
    Good luck. You'll get it to work ! Just keep trying. :)
Sign In or Register to comment.