Frictional Games Forum (read-only)
[SCRIPT] HasItem Help - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] HasItem Help (/thread-22499.html)



HasItem Help - jamer125 - 08-19-2013

ok so i'm learning tons of new scripts to this amnesia map editor but idk how to set up the HasItem function. I want it so when i pick up Agrippa's head it'll slowly do damage like per second, does anyone know how to set this up would i use an interact with entity function?


RE: HasItem Help - The chaser - 08-19-2013

This place is your friend:

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions

Anyways:

void OnStart()
{
AddTimer("", 1, "Test");
}

void Test (string &in asTimer)
{
if (HasItem("AggripaHead")) //It's possible that it has to be if (HasItem("Aggripa") == true)
{
//Your damage
}
AddTimer("", 1, "Test");
}


RE: HasItem Help - jamer125 - 08-19-2013

Got it to work thanks