Hello!, i have solved the Key unlock door problem, but now i want a grunt to spawn when im entering an area. When i start the custom story i got a crash report saying like "Could not load script, FOund parameters with the same name"
here is my new script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_study_1", "mansion_1", "UnlockDoor", true);
}
void UnlockDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);
RemoveItem(asItem);
}
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}
Is there some errors here?, i cant solve this problem