Frictional Games Forum (read-only)
[SCRIPT] Monster script help - 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] Monster script help (/thread-21812.html)



Monster script help - Hauken - 06-12-2013

Hi,

I've set up a chase sequence with path nodes and all that, he works as he should, he chases me when he sees me - by that time he have passed at least 6-9 path nodes, when he loose sight of me he turns back and walk slowly back to the nodes he miss and walk over them and then turns around and does the rest.. This is really not what I want.

So how do I solve this then, also I know there is a way to shorten all the path node lines, can anyone explain to me how that works? i got 46 lines with pathnode commands which for me seems really unessecary but thats what the wiki says..

PHP Code:
void MonsterFunction(string &in asParentstring &in asChildint alState)

{
    
SetEntityActive("servant_grunt_1"true); 
    
SetEntityActive("script_slam"true);
    
FadePlayerFOVMulTo(1.50.5f);
    
PlayGuiSound("grunt_attack_launch.snt"3.6f);    
    
AddTimer("EndVis1"1.0"EndVision1");
    
ShowEnemyPlayerPosition("servant_grunt_1"); 
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_3"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_4"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_5"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_6"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_7"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_8"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_9"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_10"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_11"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_12"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_13"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_14"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_15"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_16"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_17"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_18"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_19"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_20"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_2"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_21"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_22"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_23"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_24"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_25"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_26"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_27"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_28"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_29"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_30"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_31"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_32"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_33"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_34"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_35"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_36"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_37"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_38"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_39"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_40"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_41"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_42"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_43"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_44"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_45"0.001"");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_46"0.001"idle");




RE: Monster script help - Your Computer - 06-12-2013

(06-12-2013, 09:17 PM)Hauken Wrote: I've set up a chase sequence with path nodes and all that, he works as he should, he chases me when he sees me - by that time he have passed at least 6-9 path nodes, when he loose sight of me he turns back and walk slowly back to the nodes he miss and walk over them and then turns around and does the rest.. This is really not what I want.

That's how the monster works. If it starts to chase or track down the player, it'll temporarily ignore its assigned path. If it fails to find the player, it'll return to its assigned path from where it left off.

(06-12-2013, 09:17 PM)Hauken Wrote: So how do I solve this then, also I know there is a way to shorten all the path node lines, can anyone explain to me how that works? i got 46 lines with pathnode commands which for me seems really unessecary but thats what the wiki says..

I've updated the wiki on monster path nodes. You only need to add the path nodes that you want the monster to "pause" at and any extra path nodes that would allow the monster from having difficulty reaching the final path node.


RE: Monster script help - 7heDubz - 06-13-2013

Try just making it so the monster can see you and then putting a node where the player is supposed to break line of sight.

Now this being said i haven't done to much work with monsters before so correct me if im wrong and this wont work