Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to activate entities ??
FinBanana Offline
Junior Member

Posts: 29
Threads: 4
Joined: Jan 2012
Reputation: 0
#5
RE: How to activate entities ??

(01-31-2012, 08:19 PM)Prelauncher Wrote: Ok. would be a bit easier if I could see your script Wink 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);
}


(This post was last modified: 01-31-2012, 08:29 PM by FinBanana.)
01-31-2012, 08:28 PM
Find


Messages In This Thread
How to activate entities ?? - by FinBanana - 01-31-2012, 07:51 PM
RE: How to activate entities ?? - by Prelauncher - 01-31-2012, 07:53 PM
RE: How to activate entities ?? - by FinBanana - 01-31-2012, 08:06 PM
RE: How to activate entities ?? - by Prelauncher - 01-31-2012, 08:19 PM
RE: How to activate entities ?? - by FinBanana - 01-31-2012, 08:28 PM
RE: How to activate entities ?? - by Datguy5 - 01-31-2012, 08:29 PM
RE: How to activate entities ?? - by FinBanana - 01-31-2012, 08:37 PM
RE: How to activate entities ?? - by FinBanana - 01-31-2012, 08:44 PM
RE: How to activate entities ?? - by FinBanana - 01-31-2012, 08:57 PM
RE: How to activate entities ?? - by FinBanana - 02-03-2012, 09:49 PM
RE: How to activate entities ?? - by Prelauncher - 01-31-2012, 08:55 PM



Users browsing this thread: 1 Guest(s)