(01-31-2012, 08:19 PM)Prelauncher Wrote: Ok. would be a bit easier if I could see your script but are you using this line for when the player pick up the key: SetEntityCallbackFunc(string& asName, string& asCallback);
Calls a function when the player interacts with a certain entity.
Callback syntax: void MyFunc(string &in asEntity, string &in type)
Type depends on entity type and includes: “OnPickup”, “Break”, “OnIgnite”, etc
Here it is:
The bolded lines are the ones that should create the armors.
Lines 1-23
void OnStart()
{
AddUseItemCallback("", "key_study_1", "castle_7", "UsedKeyOnDoor2", true);
AddUseItemCallback("", "KeyOH", "castle_4", "UsedKeyOnDoor1", true);
AddUseItemCallback("", "KeyOH", "castle_6", "UsedKeyOnDoor1", true);
AddUseItemCallback("", "key_study_2", "castle_8", "UsedKeyOnDoor3", true);
AddUseItemCallback("", "key_study_3", "castle_9", "UsedKeyOnDoor4", true);
AddUseItemCallback("", "key_study_3", "castle_10", "UsedKeyOnDoor5", true);
AddUseItemCallback("", "key_study_4", "castle_12", "UsedKeyOnDoor6", true);
AddUseItemCallback("", "key_laboratory_1", "castle_11", "UsedKeyOnDoor7", true);
AddUseItemCallback("", "key_1tohall", "1tohall_1", "UsedKeyOnLevelDoor1", true);
SetEntityPlayerInteractCallback("key_study_2", "Pickup1", true);
SetEntityPlayerInteractCallback("key_study_3", "Scare3", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "Scare1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Scare2", true, 1);
}
void Pickup1(string& asName, bool abActive)
{
SetEntityActive("armor1", true);
SetEntityActive("armor2", true);
SetEntityActive("armor3", true);
}