![]() |
Monster activation newb - 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: Monster activation newb (/thread-17322.html) |
Monster activation newb - zaggnut - 07-28-2012 i am trying to learn/practice scripting by activating a grunt and have it follow path nodes. i can load my map fine but when i enter the script area nothing happens. i believe the names of my entities/areas match between the .map and .hps .... i need someone that has mastered the dark arts of scripting i spent like 2 hours trying to do this simple task. ![]() is there anything wrong with my syntax or something? //////////////////////////// // Run first time starting map void onstart() { AddEntityCollideCallback("Player", "Scr_enemyspawn1", "MonsterFunction", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("Grunt_1", true); AddEnemyPatrolNode("Grunt_1", "PathNode_1", 0, ""); AddEnemyPatrolNode("Grunt_1", "PathNode_2", 0, ""); AddEnemyPatrolNode("Grunt_1", "PathNode_3", 0, ""); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } RE: Monster activation newb - Kazakarumariou - 07-28-2012 void onstart() void OnStart() RE: Monster activation newb - FlawlessHappiness - 07-29-2012 Good thing to know is: Monsters do follow pathnodes, even if they aren't in the script. If you have a lot of pathnodes in every room and corridors, and set the monster to go to 1 specific pathnode then it will pass the closest pathnodes to get to the scripted one ![]() RE: Monster activation newb - zaggnut - 07-29-2012 (07-28-2012, 11:33 PM)Harthex Wrote: void onstart()thx for the "professional" help ![]() (07-29-2012, 12:02 AM)beecake Wrote: Good thing to know is:i'll keep that in mind when i am raging @ notepad++ |