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
Error. missing a ";" or ","
Hartmann Offline
Member

Posts: 52
Threads: 18
Joined: Jun 2012
Reputation: 0
#7
RE: Error. missing a ";" or ","

(06-23-2012, 04:48 PM)SilentStriker Wrote: May I ask what MyFunc is for?

The easiest way to make a KeyOnDoor script is by using the syntax's in the function instead of calling KeyOnDoor_1 KeyOnDoor_2 etc

use this script:

PHP Code: (Select All)
void OnStart()
{
AddUseItemCallback("", "key_1", "mansion_1", "KeyOnDoor", true); 
AddUseItemCallback("", "key_2", "mansion_2", "KeyOnDoor", true);
AddUseItemCallback("", "key_3", "mansion_5", "KeyOnDoor", true);
SetEntityPlayerInteractCallback("key_3", "ActivateMonster", true);
SetEntityPlayerInteractCallback("key_3", "DoorLook", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door", asEntity, 0.0f, true);
RemoveItem(asItem);
}

void DoorLook(string& asEntity);
{
AddPropImpulse("mansion_3", 0, 0, 10, "World");
AddTimer("StopLook", 3, "LookAtDoor");
PlaySoundAtEntity("", "unlock_door.snt", "mansion_5", 0.0f, true);
StartPlayerLookAt("mansion35", 10, 10, "");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
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");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 4, "Idle");
}

void LookAtDoor(string &in asTimer)
{
StopPlayerLookAt();
} 
Please red the thread Smile
06-23-2012, 04:54 PM
Find


Messages In This Thread
Error. missing a ";" or "," - by Hartmann - 06-23-2012, 03:08 PM
RE: Error. missing a ";" or "," - by Cruzore - 06-23-2012, 03:35 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 03:58 PM
RE: Error. missing a ";" or "," - by Cruzore - 06-23-2012, 04:17 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 04:28 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 04:54 PM
RE: Error. missing a ";" or "," - by Cruzore - 06-23-2012, 05:02 PM
RE: Error. missing a ";" or "," - by Hartmann - 06-23-2012, 05:08 PM



Users browsing this thread: 1 Guest(s)