
Jump to certain position after restarting room?
#1
Posted 28 September 2011 - 04:06 AM
#2
Posted 28 September 2011 - 04:09 AM
#3
Posted 28 September 2011 - 04:21 AM
#4
Posted 28 September 2011 - 05:00 AM
with(all) { if object_index!=obj_mainplayer // or whatever the main player's object index is (the ! means not) { x=xstart; y=ystart} }
But if the instances are destroyed, this would be a little harder I think
Edited by Hazard94, 28 September 2011 - 05:00 AM.
#5
Posted 28 September 2011 - 07:53 AM
In the Create event of the title screen, define three global variables:
global.checkpoint =-1 global.sx = 0 global.sy = 0
When you collide with a checkpoint, let the player perform this code:
global.sx = x global.sy = y global.checkpoint = room
in the Create event of the player, also put this:
if(global.checkpoint == room){ x = global.sx y = global.sy }
Note: you might want to set global.checkpoint to -1 again when the player reaches the goal of the level.
If this helps you, please show me your gratitude by trying out my games

Edited by Yal, 28 September 2011 - 07:54 AM.
- The above is my personal opinion and in no way representative of Yoyogames or the GMC, except when explicitly stated -
Open this spoiler for my games:
Some useful game engines, music and other resources at affordable prices:
My collection of game resources at itch.io
New user? Can't draw but want to look unique? You can request a new avatar in this thread!