The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 3 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pathnodes help!
johan116360 Offline
Junior Member

Posts: 9
Threads: 2
Joined: Mar 2012
Reputation: 0
#1
Pathnodes help!

Hi, im working on a custom story but im trying to do pathnodes but it never works. plz help and heres the code:


void OnStart()
{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
SetEntityCallbackFunc("key1", "OnPickup");
AddUseItemCallback("", "key1", "mansion_1", "UsedKeyOnDoor", true);
SetEntityCallbackFunc("crowbar_1", "OnPickups");
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1);
{

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("monster_a", true);
AddEnemyPatrolNode("monster_a", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("monster_a", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("monster_a", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("monster_a", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("monster_a", "PathNodeArea_6", 4, "");
}





void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key1");
}

void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("servant_grunt_1", true);
ShowEnemyPlayerPosition("servant_grunt_1");
}








void func_slam(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("door1", 0.0f);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}

void OnLeave()
{

}
03-18-2012, 03:11 PM
Find


Messages In This Thread
Pathnodes help! - by johan116360 - 03-18-2012, 03:11 PM
RE: Pathnodes help! - by Adny - 03-18-2012, 06:12 PM
RE: Pathnodes help! - by johan116360 - 03-19-2012, 07:43 PM



Users browsing this thread: 1 Guest(s)