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
Help! Script error!!
xxR3LoaD3dxx Offline
Junior Member

Posts: 5
Threads: 3
Joined: Mar 2012
Reputation: 0
#1
Help! Script error!!

So I am working on my custom story and I have a scripted sequence that is set to start 1 second after player collides with a script area.

I will qoute the file below, upon entering the map it says there is some kind of error with the signature on the AddEntityCollideCallback that I have, I don't see anything wrong with it. granted im not a pro scripter Tongue

Please help! I have put alot of work into what I have so far and want to keep making progress on it so i can put it up on ModDB. Please and thank you for your help Big Grin

Quote: //////////////
void OnStart()
{
AddEntityCollideCalback("Player", "ChaseStart", "ChaseStartFunc", true, 1);
}

/////////////////////////////////////////////////////////////////////////
void ChaseStartFunc(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("scratches_7", 5, 10, "");
AddTimer("tmrChase", 1.0f, "ChaseSequence");
}
void ChaseSequence(string &in asTimer)
{
AddLocalVarInt("iIntroPart", 1);
float partSpeed = 1.5f;
switch (GetLocalVarInt("iIntroPart"))
{
case 1: // First part
partSpeed = 3.0f;
StartPlayerLookAt("ink_bottle_1", 2, 5, "");
PlaySoundAtEntity("", "00_laugh.snt", "Player", 0, false);
break;
case 2: // Second part
partSpeed = 8.0f;
StartPlayerLookAt("barrel01_1", 5, 10, "");
AddPropForce("wine02_1", 0, 0, 1000, "World");
break;
case 3: // Third part
partSpeed = 2.0f;
SetEntityActive("enemy_suitor_malo_1", true);
SetPropHealth("prison_4", 0.0f);
ShowEnemyPlayerPosition("enemy_suitor_malo_1");
SetPlayerActive(true);
break;
}

if (GetLocalVarInt("iIntroPart") <3)
{
AddTimer("tmrChase", partSpeed, "ChaseSequence");
}
}

//////////////
void OnEnter()
{

}

//////////////
void OnLeave()
{

}

Nothings scarier then a screaming naked man flying down a hallway at 200mph.....wait...what?
03-10-2012, 07:39 PM
Find


Messages In This Thread
Help! Script error!! - by xxR3LoaD3dxx - 03-10-2012, 07:39 PM
RE: Help! Script error!! - by UnseenLegend ( NL ) - 03-10-2012, 10:09 PM
RE: Help! Script error!! - by xxR3LoaD3dxx - 03-10-2012, 11:52 PM
RE: Help! Script error!! - by Apjjm - 03-10-2012, 11:07 PM
RE: Help! Script error!! - by UnseenLegend ( NL ) - 03-11-2012, 02:06 PM
RE: Help! Script error!! - by Apjjm - 03-11-2012, 03:10 PM



Users browsing this thread: 1 Guest(s)