![]() |
Script bug - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Script bug (/thread-13277.html) |
Script bug - onv - 02-12-2012 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.) RE: Script bug - flamez3 - 02-12-2012 You capitalized the "B" last 2 AddEntityColideCallback's Use these instead: AddEntityCollideCallback("Player", "ScriptArea_2", "HammerScare", true, 1); AddEntityCollideCallback("Player", "ScriptArea_3", "MonsterPath", true, 1); And no there is no such thing, although you can use notepad ++ and change the language to c++, much easier to identify problems. You can also check out developer mode : http://wiki.frictionalgames.com/hpl2/amnesia/devenvguide RE: Script bug - Your Computer - 02-12-2012 The only stable program to verify an HPS file is the game itself. However, MulleDK19 was working on something like that, but no public release yet. |