my coding is, first of all, obviously wrong, that is why i am here. and i cant figure it out, also why i am here. in my game, when i enter my first room, everything is fine, but when i try to exit and go back to the original room, it just completely ignores the entrance object, as if it doesn't even exists, which it does. any help would be appreciated.
GML:
with(oplayer){
if (tilemap_get_at_pixel(layer_tilemap_get_id(layer_get_id("Entrance_2")), x, y)) or (tilemap_get_at_pixel(layer_tilemap_get_id(layer_get_id("Entrance")), x, y)) or (tilemap_get_at_pixel(layer_tilemap_get_id(layer_get_id("Entrance_3")), x, y))
{
if (room = rvillage)
{
if (tilemap_get_at_pixel(layer_tilemap_get_id("Entrance"), x, y))
{
global.goto_rvillage = true;
x = cave_xpos;
y = cave_ypos;
with (oblack)
{
if (image_alpha <= 1) or (global.down == true)
{
image_alpha -= .1
room_goto(rcave)
}
else
{
image_alpha += .1
}
if (image_alpha <= 0) and (global.down == true)
{
global.down = false;
}
}
}
else{
if (room == rcave)
{
if (tilemap_get_at_pixel(layer_tilemap_get_id(layer_get_id("Entrance")), x, y))
{
global.goto_rcave = true;
x = village_xpos;
y = village_ypos;
with (oblack)
{
if (image_alpha <= 1) or (global.down == true)
{
image_alpha -= .1
room_goto(rvillage)
}
else
{
image_alpha += .1
}
if (image_alpha <= 0) and (global.down == true)
{
global.down = false;
}
}
}
}
}
}
teleported = true;
}
}