F
FoxandRavenGames
Guest
I have a locked chest and when i interact with it while i have a key it spawns the unlocked chest. When i set my Locked chest i either set it there or mark "Flip X" on the object in room. I want my unlocked chest to spawn the same direction as locked chest. thanks for the help. The code below is my collision code on o_player with o_chest_locked.
GML:
if keys >= 1 {
with(other) {
can_pickup = true; {
die = true;
with(other) {
if keys > 0 {
keys--;
var inst = instance_create_layer(o_chest_locked.x, o_chest_locked.y, "Chest", o_chest_unlocked);
with(inst)
{
effect_create_above(ef_smoke, o_chest_locked.x, o_chest_locked.y + 9, .08, c_purple);
}
}
audio_play_sound(snd_unlock_chest, 15, false);
}
}
}
}