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
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Script Help

Quote:void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddUseItemCallback("", "key1", "Mansion_6", "FUNCTION1", true);
AddUseItemCallback("", "key2", "castle_6", "FUNCTION2", true);
}


void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
}
void FUNCTION1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Mansion_6", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("key1");
}


void FUNCTION2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door1", 0, false);
RemoveItem("key2");
}

The things like "AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); " Always go in the void OnStart() block. I've also renamed some of your functions; two different functions can't have the same name. Just copy and paste that into your script.

(This post was last modified: 12-11-2011, 12:03 AM by flamez3.)
12-11-2011, 12:01 AM
Find


Messages In This Thread
Script Help - by aqfitz622 - 12-10-2011, 10:25 PM
RE: Script Help - by flamez3 - 12-11-2011, 12:01 AM



Users browsing this thread: 1 Guest(s)