RE: Help,multiple scripts in one map!
Heres the script
////////////////////////////
// Run when the map starts
void OnStart()
{
AddUseItemCallback("", "key_1", "door1", "KeyOnDoor", true);
SetEntityCallbackFunc("key_1", "OnPickup");
AddEntityCollideCallback("Player", "InYourFace", "Woho", true, 1);
}
void Woho(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Untrustable_1", true);
PlaySoundAtEntity("", "04_scream.snt", "Untrustable_1", 0, false);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("key_1");
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt_1", true);
GiveSanityDamage(10.0f, true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
|