Hey, trying to make my own map for the first time and i've run into some error once i started to make it a bit more complicated.
1: I want my key (key_1) to activate a monster
2: I want that key to unlock a door (door_1)
3: I want to set a patrolnode for that monster once i activate it
(Optinal)4: if anyone could also assist me with how to changemap once i've opened the last door that would be great.
I'm deeply grateful for any assistance since i'm a noob and all!
I'm getting an error message which says:
This is my script so far:
////////////////////////
//Run when starting map
void OnStart()
{
SetEntityPlayerInteractCallBack("key_1", "ActivateMonster", true);
}
////////////////////////
//Run when entering map
void OnEnter()
{ AddUseItemCallback("","key_1","door_1","UsedKeyOnDoor". true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
}
void ActivateMonster(string &in item)
{
SetEntityActive("monster_1", true);
AddEnemyPatrolNode("monster_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("monster_1", "PathNodeArea_2", 0, "idle");
}
////////////////////////
//Run when leaving map
void OnLeave()
{
}