| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- last_safe_x = x;
- last_safe_y = y;
- if global.target_door_id != -1
- {
- with(oDoor)
- {
- if door_id == global.target_door_id
- {
- other.x = x;
- other.y = y;
- global.door_direction = door_direction;
- }
- }
- state = state_exit_door;
- enter_room_timer = enter_room_timer_max;
- switch(global.door_direction)
- {
- case "LEFT":
- facing = -1;
- x_spd = facing * walk_spd;
- y_spd = 0;
- set_sprite(sPlayerWalk);
- break;
- case "RIGHT":
- facing = 1;
- x_spd = facing * walk_spd;
- y_spd = 0;
- set_sprite(sPlayerWalk);
- break;
- case "UP":
- y_spd = 0.6 * jump_spd;
- enter_room_timer = enter_room_timer_max * 0.5;
- break;
- case "DOWN":
- enter_room_timer = enter_room_timer_max * 0.5;
- }
- }
- else
- {
- x = global.save_data.world.spxPos;
- y = global.save_data.world.spyPos;
- }
- global.camera.smooth = 0.1;
- global.camera.follow = self;
- camera_snap();
-
- if global.save_data.player.corpse.targetRoom == room
- icl(oPlayerCorpse,
- global.save_data.player.corpse.xPos,
- global.save_data.player.corpse.yPos);
|