I see. In that case, in OnStart, change SetLocalVar to AddLocalVar.
For the key,
OnEnter()
{
...
AddEntityCollideCallback(stuff, other stuff, FunctionA, false, 1);
...
}
void FunctionA(string &in asParent, string &in asChild, int alState)
{
if(HasItem("key_1"))
{
AddTimer("", 0, "startattack"
RemoveEntityCollideCallback(string& asParentName, string& asChildName);
}
}
Edit: Forgot to add the remove entity collide callback after the timer in the code.
For the floor, I'd set the door to inactive and turn the addcollidecallback into a comment, go over and see if it's there before it activates, and if it is then continue to check which of the involved code it is by commenting a piece, checking and just kind of continue like that. If it's not there at first, it may be a texture issue or something.