Hello, I need help with a Script: I want to put a script when you open a closet Insanity and sanity will drop the character. But what I want to rip out and says ERR: Expected identifier. Here I leave the script to see the error
Thanks for your attention.
////////////////////////////
// Run when entering map
void OnStart()
{
for(int i = 0;i < 2;i++) {GiveItemFromFile("tinderbox", "tinderbox.ent");}
AddUseItemCallback("", "llave_placar01", "Puerta_pieza_comienzo", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Puerta_pieza_comienzo", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Puerta_pieza_comienzo", 0, false);
RemoveItem("llaveplacar01");
}
AddEntityCollideCallback("cabinet_nice_1", "InsanityPlacar_1", "Cordurabaja", true, 0);
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
void Cordurabaja(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(20, true);
}
Sorry for my bad english =(
HEEEELP!