(07-15-2012, 09:10 PM)Your Computer Wrote: (07-15-2012, 01:49 AM)Your Computer Wrote: (07-15-2012, 01:01 AM)zergling50 Wrote: which paramater variable names do I have messed up?
SetSwingDoorLocked(entity, false);
PlaySoundAtEntity("", "unlock_door", entity, 0, false);
RemoveItem(item);
You should have received the AngelScript output telling you this.
BTW, i meant that the bold words were wrong, not right (see context).
My code right now is this:
////////////////////////////
// Run when starting map
void OnStart()
{
AddUseItemCallback("", "key_1", "castle_1", "KeyOnDoor", true);
SetEntityPlayerInteractCallback("key_1", "ActivateMonster", true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
void ActivateMonster(string &in asItem)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door", "KeyOnDoor", 0, false);
RemoveItem("key_1");
}
What should those values be changed to?