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.)
|