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 Help Monster script help
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#1
Monster script help

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: (Select All)
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");

06-12-2013, 09:17 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Monster script help

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

Tutorials: From Noob to Pro
06-12-2013, 11:06 PM
Website Find
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#3
RE: Monster script help

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

06-13-2013, 12:05 PM
Find




Users browsing this thread: 1 Guest(s)