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
Script bug
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#1
Script bug

Here's my script :


////////////////////////////
// Run when entering map
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Hurt", true, 1);
AddEntityCollideCallBack("Player", "ScriptArea_2", "HammerScare", true, 1);
AddEntityCollideCallBack("Player", "ScriptArea_3", "MonsterPath", true, 1);
}

void Hurt(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(5.0f, "BloodSplat", false, false);
SetMessage("Messages", "One", 4.0f);
AddEntityCollideCallBack("Player", "ScriptArea_4", "Hurtagain", false, 1);
}

void HammerScare(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
SetEntityActive("stone_hammer_move_1", true);
AddPropImpulse("stone_hammer_move_1", -5000, 0, 0, "world");
StartPlayerLookAt("stone_hammer_move_1", 3.1f, 5.0f, "");
AddTimer("timer01", 1.0f, "TakeDamage");
}

void Hurtagain(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(5.0f, "BloodSplat", false, false);
}

void TakeDamage(string &in asTimer)
{
GivePlayerDamage(10.0f, "BloodSplat", false, false);
PlaySoundAtEntity("scare01", "player_falldamage_max.snt", "Player", 2.0f, false);
}

void MonsterPath(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
StartPlayerLookAt("servant_grunt_1", 3.0f, 6.0f,"");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Run");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddTimer("timer02", 4.0f, "EnemyDeath");
}

void EnemyDeath(string &in asTimer)
{
SetPlayerActive(true);
StopPlayerLookAt();
FadeEnemyToSmoke("servant_grunt_1", false);
}

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

}

When i try to launch the map , it says :

No matching signature with AddEntityCollideCallback......
Can someone check my script , and report anything wron in it ?

Thanks


Also , is there a software that can "verify" the .hps file , so when there's an error , it tells it to you. (I already know the XMLValidator , but it only work for the extra_english.lang file.)
02-12-2012, 03:37 PM
Find


Messages In This Thread
Script bug - by onv - 02-12-2012, 03:37 PM
RE: Script bug - by flamez3 - 02-12-2012, 03:41 PM
RE: Script bug - by Your Computer - 02-12-2012, 06:02 PM



Users browsing this thread: 1 Guest(s)