Skip to content

Commit

Permalink
add: final room and endings
Browse files Browse the repository at this point in the history
have some stuff left but everything is pretty much good
  • Loading branch information
squidistaken committed Jan 22, 2023
1 parent 6df2790 commit 1bd32b0
Show file tree
Hide file tree
Showing 27 changed files with 713 additions and 10 deletions.
16 changes: 16 additions & 0 deletions Y1B2 Game.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion objects/obj_cameraPosition/Step_2.gml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ centerviewX = camera_get_view_width(view_camera[0]) / 2;
if (obj_cameraPosition.x > obj_cameraLeftLimit.x) && (obj_cameraPosition.x < obj_cameraRightLimit.x)
{
camera_set_view_pos(view_camera[0], x - centerviewX , -40);
}
}
1 change: 1 addition & 0 deletions objects/obj_control/Other_2.gml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// @description Game Setup
global.playerControl = true;
global.loseCount = 0;

// There was a bug for sequences where audio was one direction only, this fixes it!
audio_listener_position(window_get_width()/2, window_get_height()/2, 0);
Expand Down
4 changes: 4 additions & 0 deletions objects/obj_door/Other_4.gml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ switch room
case rm_puzzle02:
image_index = 4;
break
case rm_puzzle04:
// Defining how we want the sprite to look
image_index = 2;
break
}
8 changes: 6 additions & 2 deletions objects/obj_door/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// @description Unlocking doors

// Checking to see if either player is colliding with the door
if (place_meeting(x-obj_plr2.horizontalSpeed,y,obj_plr2)) || (place_meeting(x-obj_plr1.horizontalSpeed,y,obj_plr1))
// Checking to see if a player is colliding with the door
if (place_meeting(x-obj_plr1.horizontalSpeed,y,obj_plr1))
{
// Checking to see if someone is carrying something
if (obj_plr1.itemCarrying != noone)
Expand All @@ -17,6 +17,10 @@ if (place_meeting(x-obj_plr2.horizontalSpeed,y,obj_plr2)) || (place_meeting(x-ob
audio_play_sound(sfx_switch_on,10000,0);
}
}
}

if (place_meeting(x-obj_plr2.horizontalSpeed,y,obj_plr2))
{
if (obj_plr2.itemCarrying != noone)
{
if obj_plr2.itemCarrying.itemType == "key"
Expand Down
3 changes: 3 additions & 0 deletions objects/obj_nextroom/Create_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// @description Timer

timer = 180
31 changes: 27 additions & 4 deletions objects/obj_nextroom/Step_0.gml
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
/// @description Progress to next room

if (place_meeting(x,y,obj_plr1) && place_meeting(x,y,obj_plr2))
if room != rm_puzzle04
{
audio_play_sound(sfx_ui_transition,10000,0);
room_goto_next();
}
if (place_meeting(x,y,obj_plr1) && place_meeting(x,y,obj_plr2))
{
audio_play_sound(sfx_ui_transition,10000,0);
room_goto_next();
}
}

if room == rm_puzzle04
{
if (place_meeting(x,y,obj_plr2))
{
timer = timer - 1;

if (timer <= 0)
{
audio_play_sound(sfx_gameover_3,10000,0);
room_goto(rm_ending01);
}

if (place_meeting(x,y,obj_plr1))
{
audio_play_sound(sfx_ui_finish,10000,0);
room_goto(rm_ending00);
}
}
}
1 change: 1 addition & 0 deletions objects/obj_nextroom/obj_nextroom.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions objects/obj_switch/Other_4.gml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ switch room
sprite_index = spr_switch_floor;
switchesNeeded = 1;
break
case rm_puzzle04:
switchesNeeded = 1;
break
case rm_graybox:
switchesNeeded = 2;
break
Expand Down
51 changes: 51 additions & 0 deletions rooms/rm_ending00/rm_ending00.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions rooms/rm_ending01/rm_ending01.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1bd32b0

Please sign in to comment.