Hi Yal, thank you so much for making this engine, making my childhood dream of making a monster collector game possible!
Recently I discovered a bug where when interacting with anything that opens a dialogue box (npcs, signs, chests, etc), it instantly reactivates once the dialogue is complete. The only way to 'get out' of an interaction is to hold down an arrow key that turns the player away immediately after the interaction ends.
I am still a beginner at coding, so I'm sorry if this seems like a silly question. I have tried messing around with deactivation alarms and checking the interaction scripts, but nothing worked.
One thing I did notice is that in the free demo version of the game there's no such issue. Could it be my GMS version? Currently, I am using the newest Version 2024.06.2.162
Viewing post in Yal's Monster Collector Engine comments
I tried it out and also can see it, so something has changed with GM's processing order that causes this (it was always a bug but it just didn't happen before for some reason, lol - presumably the player was always handled before the dialogue boxes but now it's handled after and thus retriggers the interaction immediately after it closes)
It's easy to fix at least, just update the "Interacting" block of obj_player's step event like so:
//Interacting
if(interaction_cooldown){
interaction_cooldown--
}
else{
if(k_a && !p_a){
var o = collision_circle(
x + lengthdir_x(TILESIZE,drawdir) - TILESIZE*0.5,
y + lengthdir_y(TILESIZE,drawdir),
12,
parent_interactible,false,true
)
if(o > 0 && instance_exists(o)){
interaction_cooldown = 5
with(o){
if(object_index == obj_npc || object_is_ancestor(object_index,obj_npc)){
drawdir = (other.drawdir + 180) mod 360
}
if(interact_script != NONE){
script_execute(interact_script)
}
}
}
}
}
Then just initialize interaction_cooldown to 0 in the Create event and everything should work as expected.