Frictional Games Forum (read-only)

Full Version: HasItem Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
This place is your friend:

http://wiki.frictionalgames.com/hpl2/amn..._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");
}
Got it to work thanks