StefanieBlack18
Member
I'm running into a problem I can't seem to fix, perhaps someone can assist:
My warps are all set up and work just fine for all of my rooms thus far, however, in my town room where you would hit the warps on a vertical when entering a building, they are causing what I can only describe as "ghost warp spaces" around the bottom of the warp that will take you inside the building room. To SEE what is going on, I posted a unlisted video on my YouTube channel:
My code **looks** ok to my untrained eye, nothing weird, but perhaps I am missing something. This is what I currently have on my obj_warp:
And this is what's on my move_state.gml
My warps are all set up and work just fine for all of my rooms thus far, however, in my town room where you would hit the warps on a vertical when entering a building, they are causing what I can only describe as "ghost warp spaces" around the bottom of the warp that will take you inside the building room. To SEE what is going on, I posted a unlisted video on my YouTube channel:
My code **looks** ok to my untrained eye, nothing weird, but perhaps I am missing something. This is what I currently have on my obj_warp:
Code:
CREATE
// @desc Inititalize
target = 0;
xx = 0;
yy = 0;
active = 0;
ROOM START
/// @desc Reactivate
active = 0;
COLLISION (obj_eris which is the player)
/// @desc Fadeout to next room
if (active == 0) {
fadeout (target, c_black, 0.05, xx, yy);
active = 1;
}
Code:
//--------COLLISION CHECKS
//Horizontal
if(moveX != 0){
if(place_meeting(x + moveX, y, obj_collision)){
repeat (abs(moveX)){
if(!place_meeting(x+sign(moveX), y, obj_collision)){ x += sign(moveX); }
else { break; }
}
moveX = 0;
}
}
//-------Vertical
if(moveY != 0){
if(place_meeting(x, y + moveY, obj_collision)){
repeat (abs(moveY)){
if(!place_meeting(x, y+sign(moveY), obj_collision)){ y += sign(moveY); }
else { break; }
}
moveY = 0;
}
}