pixeltroid
Member
I just discovered this bug.
In my game, player uses a key to go past a door.
Heres the code that determines what happens if player collides with door:
And here's what I have in the doors creat
The code works...but ONLY if the door is NOT marked as a solid object. But, if its not marked as a solid object, the player can simply walk through the door even if he doesnt have a key!
However, if I mark the door as a solid object, the player cannot open it even if he has a key!
What am I doing wrong?
Any help would be appreciated!
In my game, player uses a key to go past a door.
Heres the code that determines what happens if player collides with door:
Code:
if global.keys>0 {
with other{
global.door_opened[door_id] = true
instance_destroy();
audio_play_sound(sfx_dooropen,9,false)
instance_create(x,y,obj_dooropening)
}
global.keys = global.keys -1 }
else {
speed = 0
}
Code:
if global.door_opened[door_id] = true {
instance_destroy();
}
However, if I mark the door as a solid object, the player cannot open it even if he has a key!
What am I doing wrong?
Any help would be appreciated!