• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Place meeting not working

I am making a room switcher and i am making sure if the player touches a object it will switch into the other room
Heres the code:
if place_meeting(x,y,ExitObject)
{
show_debug_message("Next level")
room_goto(Room2);
}
 

Slyddar

Member
Some questions.
Where have you placed this code?
Does the ExitObject object exist in the room, and have your checked it's mask is correct?
Have you tried adding the contents of the brackets into a collision event between ExitObject and what ever you want it to collide with?
 

Gamebot

Member
1. I can see your checking for "y" generally, it should be y - 1 for above then y + 1 for below.
2. Where is this code located ( object ) and which event
3. Post and/or check your mask_index ( colliison bounding box ) issue.

EDIT: @Slyddar SNIPPED ME BY A SECOND!
 
The idiot i am didnt create a new layer to the ExitObject so when i dragged it in the room and it didnt let me i thought moving the sprite was what i was supposed to do.
 
Top