Mr.S Posted August 2, 2006 Report Share Posted August 2, 2006 Yep i need check point help. My game is using a different engine and when sonic dies he turns into a object (Sonic dieing Animation) how could i set up a check point system. Thanks Link to comment Share on other sites More sharing options...
Damizean Posted August 2, 2006 Report Share Posted August 2, 2006 Use global variables: Everytime you start the game or finish an act, you should set a global.check_point variable to false. So, when Sonic collides within a check point, set global.check_point to true, and then store the X and Y positions of the check point on global.check_point_x and global.check_point_y. After that, when the level is restarted, you've gotta check if global.check_point is true. If it is, create the Sonic object at global.check_point_x / global.check_point_y instead of the common start place. Link to comment Share on other sites More sharing options...
VectorSatyr Posted August 2, 2006 Report Share Posted August 2, 2006 Just remember to initialize the global variables in another room before the gameplay starts. Use the room creation code. Link to comment Share on other sites More sharing options...
UltimateSonic Posted August 2, 2006 Report Share Posted August 2, 2006 If I'm not mistaken, this method could easily be applied to MMF as well? Link to comment Share on other sites More sharing options...
VectorSatyr Posted August 2, 2006 Report Share Posted August 2, 2006 Exactly, if its has variables that are persistant. Link to comment Share on other sites More sharing options...
Mr.S Posted August 2, 2006 Author Report Share Posted August 2, 2006 Use global variables: Everytime you start the game or finish an act, you should set a global.check_point variable to false. So, when Sonic collides within a check point, set global.check_point to true, and then store the X and Y positions of the check point on global.check_point_x and global.check_point_y.After that, when the level is restarted, you've gotta check if global.check_point is true. If it is, create the Sonic object at global.check_point_x / global.check_point_y instead of the common start place. Thanks just one more thing how do i store the X and Y positions ? Link to comment Share on other sites More sharing options...
Kain Posted August 2, 2006 Report Share Posted August 2, 2006 Checkpoint's collision with Sonic: global.check_point = true; global.check_pointx = x; global.check_pointy = y; Unless you mean storing them somewhere else, like a file or something. Link to comment Share on other sites More sharing options...
Recommended Posts