Hey guys, I'm having a strange problem with a bunch of books I'm trying to launch off shelves. I'll show you my script and tell you what works and doesn't work:
AddEntityCollideCallback("Player", "prebiblescript", "books", true, 1);
AddEntityCollideCallback("Player", "biblescript", "bible", true, 1);
void books(string&in asParent, string &in asChild, int alState)
{
if (HasItem("letterkey"))
{
PlaySoundAtEntity("", "12_girl_scream.snt", "Player", 0, false);
SetEntityActive("shelf01_scriptable_*", true);
SetEntityActive("book_bible_*", true);
SetEntityActive("biblescript", true);
}
}
void bible(string&in asParent, string &in asChild, int alState)
{
AddPropImpulse("book_bible_*", 20.0f, 0.0f, 0.0f, "world");
PlaySoundAtEntity("", "scare_wall_stomp.snt", "Player", 0, false);
GiveSanityDamage(10.0f, true);
}
Basically, the function "books" works, but "bible" doesn't. I can't figure out why. Is it because the function is prevented by the will of God?