Rewrote the code because I don't know what you were using as function parameters, but they weren't right. :/
void OnStart()
{
AddUseItemCallback("", "house_key", "mansion", "FUNCTION", true);
//Right here is confusing...you activate a monster, and remove another monster??? Or activate/remove the same upon interaction.
SetEntityPlayerInteractCallback("knife", "ActivateMonster", true);
SetEntityPlayerInteractCallback("knife", "GruntFade", true);
}
//add use item callback parameters are string &in asItem, string &in asEntity
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(door, false, true);
PlaySoundAtEntity("", "unlock_door", door, 0, false);
RemoveItem(asItem);
}
//going to assume this came from an Interact Callback from editor? if so, string &in asEntity
void DoorLockedPlayer(string &in asEntity)
{
if(GetSwingDoorLocked("mansion") == true)
{
SetMessage("Messages", "msgname", 0);
}
}
//from the OnStart() function, string &in asEntity as it's an Interact Callback
void ActivateMonster(string &in asEntity)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle");
}
//same as above, I'm assuming there's another grunt on the map called "grunt" and it's being removed with this function.
void GruntFade(string &in asEntity)
{
SetEntityActive("grunt", false);
}