B
BlackyyGMS
Guest
So hello guys, I have a problem with my "doors" not working, I've been trying to fix that for a couple of days but it still doesnt work. I have 4 object, 2 types of objects, 3 rooms I want to move freely between.
(My exits don't have any codes according to the video by RickyG here >
)
Both my Exits and Doors are invisible, are NOT solid, are NOT persistent and do NOT use physics
The codes for my doors are
Creation:
Collision with player (obj_chara):
and the second action for collision with the player (obj_chara)
Creation of obj_setroom
Room start (obj_setroom)
and here are my rooms with obj_door creation codes and exits
room_water_shop
(exit b)
room_precorridor
(exit b)
(exit c)
room_fake_hallway_true
(exit c)
And, the problem is that I phase through these doors, I have no error message and obj_chara doesn't teleport or anything
Tell me if you need more information or something
(My exits don't have any codes according to the video by RickyG here >
Both my Exits and Doors are invisible, are NOT solid, are NOT persistent and do NOT use physics
The codes for my doors are
Creation:
Code:
// whichroom > room you want to go
// whichexit > spawn point in the room
var whichroom
whichexit = 1;
// whichexit 0 = a
// whichexit 1 = b
// whichexit 2 = c
Code:
room_goto(whichroom);
Code:
if instance_exists(obj_setroom.object){
if whichexit = 0{
obj_setroom.a = 1;
obj_setroom.b = 0;
obj_setroom.c = 0;
}
else
{
if whichexit = 1{
obj_setroom.a = 0;
obj_setroom.b = 1;
obj_setroom.c = 0;
}
else
{
if whichexit = 2{
obj_setroom.a = 0;
obj_setroom.b = 0;
obj_setroom.c = 1;
}
}
}
}
else
{
// do nothing (for error handling)
}
Code:
// exits
a=1;
b=2;
c=2;
Code:
if instance_exists(obj_chara){
if inb = 1{
obj_chara.x = bx;
obj_chara.y = by;
inb = 0;
}
else
{
if ins = 1{
obj_chara.x = bx;
obj_chara.y = by;
ins = 0;
}
}
}
room_water_shop
Code:
whichroom = room_precorridor;
whichexit = 1;
room_precorridor
Code:
whichroom = room_water_shop;
whichexit = 1;
Code:
whichroom = room_fake_hallway_true;
whichexit = 2;
room_fake_hallway_true
Code:
whichroom = room_precorridor;
whichexit = 2;
And, the problem is that I phase through these doors, I have no error message and obj_chara doesn't teleport or anything
Tell me if you need more information or something
Last edited by a moderator: