Checkpoint HELP! **FIXED**
rassy9516
Member Posts: 13
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!
(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
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.
Change Attribute self.colour.alpha to 100
Maybe you misunderstood.
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
* 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
Will try that later.
cheers
and, reading some of the comments … makes me wonder what is broken … ROFLMA
speak up if you have another possible solution …
@};- MH
Well Im not sure.... Ill have a think.....
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)
Thanks again!