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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why wont this script work?
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#1
Why wont this script work?

Heres the script

////////////////////////////
// Run when the map starts
void OnStart()
{
AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus1", "FlyingJesus_1", "Sound", true, 1);
SetEntityCallbackFunc("Avain", "OnPickup");
}


void HolyJesus(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus1");
AddPropForce("Jesus1", 0, 0, 30000, "World");
}


void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "24_iron_maiden.snt", "FlyingJesus_1", 0, false);
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt_1", true);
GiveSanityDamage(10.0f, true);
AddEnemyPatrolNode("grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_2", 1, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_3", 1, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_4", 1, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_5", 1, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_6", 1, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_7", 1, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_8", 2, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_9", 1, "");
AddEnemyPatrolNode("grunt_1", "PathNodeArea_10", 1, "");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
Whats wrong with it?


(This post was last modified: 01-09-2012, 07:28 PM by Datguy5.)
01-09-2012, 05:46 PM
Find


Messages In This Thread
Why wont this script work? - by Datguy5 - 01-09-2012, 05:46 PM
RE: Why wont this script work? - by MulleDK19 - 01-09-2012, 05:50 PM
RE: Why wont this script work? - by Datguy5 - 01-09-2012, 06:00 PM
RE: Why wont this script work? - by Inurias - 01-09-2012, 07:25 PM
RE: Why wont this script work? - by Datguy5 - 01-09-2012, 07:27 PM



Users browsing this thread: 1 Guest(s)