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
Script Help Scripting help
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#6
RE: Scripting help

No it's supposed to look like this:


void OnStart()
{
SetEntityPlayerInteractCallback("lantern_1", "ActivateMonster", true);
AddEntityCollideCallback("Player", "push", "Push", true, 1);
AddEntityCollideCallback("Player", "door_slam", "Slam", true, 1);
}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "Idle");
}

void Push(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "push", 0, false);
AddPlayerBodyForce(30000, 0, 0, false);
}

void Slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_12", true, true);
SetSwingDoorLocked("mansion_12", true, true);
PlaySoundAtEntity("", "00_laugh.snt", "door_scare", 0, false);
}

void OnEnter()
{

}

void OnLeave()
{

}

(This post was last modified: 04-14-2012, 11:16 PM by SilentStriker.)
04-14-2012, 11:16 PM
Find


Messages In This Thread
Scripting help - by Turner64 - 04-14-2012, 11:05 PM
RE: Scripting help - by Cranky Old Man - 04-14-2012, 11:07 PM
RE: Scripting help - by Xanthos - 04-14-2012, 11:08 PM
RE: Scripting help - by SilentStriker - 04-14-2012, 11:09 PM
RE: Scripting help - by Turner64 - 04-14-2012, 11:11 PM
RE: Scripting help - by Cranky Old Man - 04-14-2012, 11:18 PM
RE: Scripting help - by SilentStriker - 04-14-2012, 11:16 PM
RE: Scripting help - by Turner64 - 04-15-2012, 12:10 AM
RE: Scripting help - by SilentStriker - 04-15-2012, 12:11 AM
RE: Scripting help - by Turner64 - 04-15-2012, 12:13 AM
RE: Scripting help - by SilentStriker - 04-15-2012, 12:13 AM



Users browsing this thread: 5 Guest(s)