Another Scripting Problem...
I once again tried to combine 2 scripts and it failed at working. I tried to make a servant grunt to become active when you went into an area. So I added: AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideRoomTwo" , true, 1); AND void SetEntityActive(servant_grunt, true);
Full script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideRoomTwo" , true, 1);
AddUseItemCallback("", "Mansion Key", "MansionDoor", "UsedKeyOnDoor", true);
}
void SetEntityActive(servant_grunt, true);
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("MansionDoor", false, true);
PlaySoundAtEntity("", "unlock_door" , "MansionDoor", 0, false);
RemoveItem("Mansion Key");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
I also wanted to point out that I DO NOT want the grunt to become active when I try to open the door... Please try to keep it seperate.
(This post was last modified: 10-10-2010, 05:20 PM by Kyle.)
|