Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///rm_initialize
- //Creation Code
- global.checkpoint = noone;
- global.checkpointR = noone;
- global.checkpointx = noone;
- global.checkpointy = noone;
- room_goto_next(); //Sends player to the next room which is the menu room
- ///obj_checkpoint //I have several of these in the room I am working with
- //Create Event
- image_speed = 0;
- image_index = 0;
- //Step Event
- if (place_meeting(x,y,obj_player))
- {
- global.checkpoint = id; //Our current checkpoint is the id of this particular checkpoint
- global.checkpointx = x;
- global.checkpointy = y;
- global.checkpointR = room;
- }
- if (global.checkpointR == room)
- {
- if (global.checkpoint == id) //If the checkpoint is this SPECIFIC checkpoint
- {
- image_speed = 0.5;
- }
- else
- {
- image_speed = 0;
- image_index = 0;
- }
- }
- if (image_index > 4)
- {
- image_index = 4;
- }
- //Room End
- instance_destroy();
- ///obj_player
- //Step Event
- if (place_meeting(x,y,obj_respawn)) && (global.checkpointR != noone)
- {
- room_goto(global.checkpointR);
- x = global.checkpointx;
- y = global.checkpointy;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement