xxR3LoaD3dxx
Junior Member
Posts: 5
Threads: 3
Joined: Mar 2012
Reputation:
0
|
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
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
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 |
|