Skip to content

Commit

Permalink
Merge pull request #38 from squidistaken/more-more-rooms
Browse files Browse the repository at this point in the history
rm_puzzle02 Completed!
  • Loading branch information
squidistaken authored Jan 21, 2023
2 parents 2f1f70d + 287b4eb commit ec45fc3
Show file tree
Hide file tree
Showing 53 changed files with 284 additions and 40 deletions.
15 changes: 9 additions & 6 deletions Y1B2 Game.yyp

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

8 changes: 5 additions & 3 deletions objects/obj_carryItem1/obj_carryItem1.yy

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

30 changes: 30 additions & 0 deletions objects/obj_door/Step_0.gml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/// @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 someone is carrying something
if (obj_plr1.itemCarrying != noone)
{
// Checking for item type, if we want we can do a switch-case loop, but it's not needed for one key/door system
if obj_plr1.itemCarrying.itemType == "key"
{
// There is a quirk that has doors require to reach a switch count, to solve this we can just make x = x pretty much.
global.switchCount = obj_switch.switchesNeeded;
instance_deactivate_object(obj_plr1.itemCarrying);
// Make sure the player isn't carrying something...
scr_dropItem(obj_plr1);
audio_play_sound(sfx_switch_on,10000,0);
}
}
if (obj_plr2.itemCarrying != noone)
{
if obj_plr2.itemCarrying.itemType == "key"
{
global.switchCount = obj_switch.switchesNeeded;
instance_deactivate_object(obj_plr2.itemCarrying);
scr_dropItem(obj_plr2);
audio_play_sound(sfx_switch_on,10000,0);
}
}
}
1 change: 1 addition & 0 deletions objects/obj_door/obj_door.yy

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

1 change: 1 addition & 0 deletions objects/obj_par_item/Create_0.gml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
verticalSpeed = 0;
grv = 0.5;
2 changes: 1 addition & 1 deletion objects/obj_par_item/obj_par_item.yy

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

4 changes: 1 addition & 3 deletions objects/obj_plr1/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ switch global.playerControl
itemCarrying.y = y - 150;
if (keyInteract) //drop item
{
itemCarrying.grv = 0.5;
itemCarrying = noone;
pauseFrame = true;
scr_dropItem(obj_plr1);
}
}

Expand Down
6 changes: 2 additions & 4 deletions objects/obj_plr2/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,13 @@ switch global.playerControl
itemCarrying.y = y - 100;
if (keyInteract) //drop item
{
show_debug_message(x)
itemCarrying.grv = 0.5;
itemCarrying = noone;
pauseFrame = true;
scr_dropItem(obj_plr2);
}
}

if (place_meeting(x,y,itemNear)) && (itemCarrying == noone) && (keyInteract) && (itemNear != obj_plr1.itemCarrying) && (!pauseFrame)
{
audio_play_sound(sfx_key_interact,10000,0);
itemCarrying = itemNear;
}

Expand Down
1 change: 1 addition & 0 deletions objects/obj_switch/Other_4.gml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ switch room
switchesNeeded = 1;
break
case rm_puzzle01:
sprite_index = spr_switch_wall;
switchesNeeded = 2;
break
case rm_puzzle02:
Expand Down
9 changes: 7 additions & 2 deletions rooms/rm_puzzle02/rm_puzzle02.yy

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

Loading

0 comments on commit ec45fc3

Please sign in to comment.