Frictional Games Forum (read-only)
Make monster run by each path node - 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: Make monster run by each path node (/thread-21471.html)



Make monster run by each path node - Hauken - 05-12-2013

Hi this is a very basic question.

So I've scripted a monster to walk by path nodes, and its working and all but he is walking -I want him to run, so I opened the Model Editor and saw that hes run animation is simply called "Run"

So i added Run to each pathnode, but he is just walking casually?

PHP Code:
void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_grunt_1"true); 
    
//ShowEnemyPlayerPosition("servant_grunt_1"); 
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_2"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_3"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_4"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_5"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_6"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_7"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_8"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_9"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_10"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_11"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_12"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_13"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_14"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_15"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_16"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_17"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_18"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_19"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_20"4"Idle");


Isnt this supposed to work?


RE: Make monster run by each path node - Slanderous - 05-12-2013

(05-12-2013, 08:45 PM)Hauken Wrote: Hi this is a very basic question.

So I've scripted a monster to walk by path nodes, and its working and all but he is walking -I want him to run, so I opened the Model Editor and saw that hes run animation is simply called "Run"

So i added Run to each pathnode, but he is just walking casually?

PHP Code:
void MonsterFunction(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("servant_grunt_1"true); 
    
//ShowEnemyPlayerPosition("servant_grunt_1"); 
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_2"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_3"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_4"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_5"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_6"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_7"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_8"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_9"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_10"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_11"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_12"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_13"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_14"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_15"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_16"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_17"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_18"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_19"0.001"Run");
    
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_20"4"Idle");


Isnt this supposed to work?

Remove "//" before "ShowEnemyPlayerPostion", I think.


RE: Make monster run by each path node - Your Computer - 05-12-2013

The monster normally runs when it has located the player and the player is not within reach but is still visible to the monster or when calling ShowEnemyPlayerPosition. If you want to give the impression that it is running, you have to increase its walking speed so that it reaches the minimum speed of the running animation.


RE: Make monster run by each path node - Hauken - 05-12-2013

Right.. He is still walking to slow, and when I show myself to the enemy, he wont go in the sprint animation against me... so i could run away from him by just looking at him and walking backwards..

Any suggestions?

I want him to run in the path nodes as fast as they can go..

___

Ok, but then I'd have to go to the model editor and change the speed amirite?
And just use a custom monster for the sequence im working on.

Which I havent done before either..


RE: Make monster run by each path node - Daemian - 05-12-2013

I didn't test this, but, maybe you could edit the model in model editor, take its Walk animation and replace it with a copy of Run. Then just save it as grunt_running or something.

And you may want to increase its speed as well.