(04-09-2012, 12:52 AM)Apjjm Wrote: You will want your code to look at follows:
void Scary1(string &in asParent, string &in asChild, int alState)
{
//Things that should happen if regardless of if you have the key or not
if(HasItem("The_gone_key"))
{
//Scary Stuff happens here for when you have the key
}
}
assuming you want to make aggrippa headless appear when the key has gone:
void Scary1(string &in asParent, string &in asChild, int alState)
{
if(HasItem("The_gone_key"))
{
SetEntityActive("agrippa_headless_1", true);
}
}
dosnt work :S the Script activate when i dont have the key :/
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_4", "Scary1", true, 1);
}
void Scary1(string &in asParent, string &in asChild, int alState)
{
if(HasItem("The_gone_key"))
{
SetEntityActive("agrippa_headless_1", true);
PlaySoundAtEntity("", "alois_amb_idle.snt", "Player", 0, false);
}
}