Chilton
Member
Posts: 138
Threads: 9
Joined: Sep 2010
Reputation:
0
|
RE: Another Scripting Problem...
Try this:
void OnStart()
{
AddUseItemCallback("", "Mansion Key", "MansionDoor", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player" , "ScriptArea_1" , "CollideRoomTwo" , true, 1);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("MansionDoor", false, true);
PlaySoundAtEntity("", "unlock_door" , "MansionDoor", 0, false);
RemoveItem("Mansion Key");
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
If that doesnt work, its because im half asleep and mistyped. It should work though - Also, your getting the organisation and syntaxing wrong - Just compare your script to my ammended one
EDIT: This should work. I got no errors when i validated it just now
|
|
10-10-2010, 05:57 PM |
|