Frictional Games Forum (read-only)
Set Zombie walking to waypoints - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Set Zombie walking to waypoints (/thread-5212.html)

Pages: 1 2


RE: Set Zombie walking to waypoints - house - 10-29-2010

Code:
void OnStart()
{
AddUseItemCallback("", "Klic", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "Klic2", "mansion_4", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true);
AddEnemyPatrolNode("Brute_1", "Point_1", 0.0f, "");
}

void OnEnter()
{

}

void OnLeave()
{

}

I found all the wrong things I could find. Copy whats in the code I just did into your .hps file. It should work.


RE: Set Zombie walking to waypoints - anzki - 10-30-2010

Also to clear thing out none of the void's is necessary.
It works fine without having OnStart(), if you don't have any script there. Same goes for OnLeave() and so on.
So all those empty:
Code:
void OnEnter()
{

}

void OnLeave()
{

}
Are not needed.