Checkpoints

GingerBGamesGingerBGames Member Posts: 390
edited November -1 in Working with GS (Mac)
Hello GS'ers,

I seem to be having a problem with check points in my game. Right now I have my Hero's X & Y updating every .1seconds, when he overlaps with the check point marker, it changes Hero's X & Y to self Position X & Y. After he hits it though, if he dies, he always starts at the beginning of the scene. I don't know why. Also, I'm using Darren's Platform Template V1.1. So it's been worked out already, the check points work for the round character in that, but not for my Animated guy? All i've done is change the graphics for the 2nd character, and I've also changed the rule in the Hero Checkpoint icon to collide with my hero actor. Does anyone know what else I could try?

Thank you.

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    What if you make two attributes checkpointX and checkpointY. Then when your hero hits a checkpoint change checkpoint X to heroX value and same for Y. That way checkpoint X and Y will always be teh X and Y value of the last checkpoint you hit.

    Then if hero dies move him to checkpointx and checkpointY
  • GingerBGamesGingerBGames Member Posts: 390
    That's a good idea, i'll give it a try, thank you.
  • GingerBGamesGingerBGames Member Posts: 390
    I found the problem, the problem was that when the checkpoint slowly reduced it's alpha color to 0, it would hit 0 and destroy. So when the hero died, there was no checkpoint to go to, so that's why he would go to the beginning. So to fix it, just delete the when at 0 destroy rule in the checkpoint, now it works. Thanks for you help.
  • simo103simo103 Member, PRO Posts: 1,331
    no prob.... keep it in mind if you find you don't need to constrain your hero's x and Y for other reasons as you could turn that constrain off and have a rule just happen when the checkpoint is hit ... that is only of course if you don't have the constrain on your hero for other reasons also.
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    since you r not recycling the actor therefore if it dies and new actor spawn, it will use the original attribute of X & Y.
Sign In or Register to comment.