Appo Posted October 21, 2008 Report Share Posted October 21, 2008 Hey i have another problem ...... again, i might be being thicker than the offspring of a village idiot and a T.V weather girl but i can't seem to figure this one out, sonic won't start at a checkpoint he keeps spawning at the begining of the level, any help would be appreciated thanks EDIT: I've managed to figure it out, but i can only place one checkpoint at the moment, i relly wanted to put more than 1 in, so could somone please help me out with this, thanks Link to comment Share on other sites More sharing options...
hRook Posted October 21, 2008 Report Share Posted October 21, 2008 Sounds like you're not thinking your problem through all the way. As it stands, you're not giving the game a way to tell which checkpoint to start at. I guess at the start of the frame, spread values through each checkpoint or something to give each one an identifier. Then when Sonic collides with a checkpoint, have it pull that value out (Alterable Value I) and do something with it. I haven't used MMF in a long time, but this just sounds like a logic problem. Hope it helps. 1 Link to comment Share on other sites More sharing options...
Nitemare Posted October 21, 2008 Report Share Posted October 21, 2008 hRooks method would work, however I find it easier to make the checkpoint a global object that upon colliding with has an alterable value set to 1. Then store the x position, y position and time in the applications global values. Using this method any checkpoints that have been hit can be activated at the start of the frame via the alterable value, and the global values will always have stored the position of the most recently hit checkpoint. Just make sure you reset the alterable values at the end of the frame. ;O Link to comment Share on other sites More sharing options...
Appo Posted October 21, 2008 Author Report Share Posted October 21, 2008 Thanks for the replies, i have used globals of CheckpointX and Y to be set by a new Object an orange arrow that sets it posistion next to the checkpoint the problem i that if i put another check point in the 'orange arrrow' doesn't set its position to the first checkpoint sonic touches.......sorry crap description, heres a screen shot of the code i have EDIT: thanks guys, i forgot you could set objects to be global, duh, anyway i think i got it sorted now thanks Link to comment Share on other sites More sharing options...
Blue Frenzy Posted October 22, 2008 Report Share Posted October 22, 2008 You are going to have problems with that. if sonic collides with checkpoint +animation checked is not playing +the timer is greater than 1 second --------------- -play sample "checkpost" if sonic collides with checkpoint --------------- -set global value X to checkpoint.x -set global value y to checkpoint.y -set global valuz z to 1 -change checkpoint animation to checked. at start of frame +global value z=0 ------------------ -set sonic position to start arrow position. at start of frame +global value z=1 ---------------------- -set sonic x position to global value x -set sonic y position to global value y at loading game or new game: set global value z to 0 at colliding with end marker, set global value z to 0. 1 Link to comment Share on other sites More sharing options...
Appo Posted October 22, 2008 Author Report Share Posted October 22, 2008 Yeah, i've actully changed it all now and it seems to be running nicely, it'ss pretty much the same, i forgot to include the 'start of frame-global checkpoint>1 -- set float x and y to checkpoint arrow x and y in the screen shot as that event is at the begining of the code (oh a bit late now, but im using the sonic worlds engine if enyone was wondering), but thanks for the informative reply Link to comment Share on other sites More sharing options...
Recommended Posts