Frictional Games Forum (read-only)
[SCRIPT] Grunt Animations - 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] Grunt Animations (/thread-14462.html)



Grunt Animations - Dutton - 04-03-2012

So today i got a bit curious after reading a post on the forums, and decided to make a small test map. containing a corridor with a metal table and a resized cabinet.

Now what is supposed to happend is that i pickup a key and a grunt will spawn with disabled triggers. and it should play an animation when reaching the first pathnode, which was "run.anm".

Here is my hps file:



void OnStart()
{
SetEntityCallbackFunc("activategrunt", "startgruntrun");
}

void startgruntrun(string &in asEntity, string &in type)
{
SetEnemyDisableTriggers("servant_grunt_1", true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "run.anm");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "notice1.anm");
}

The animations are included at the end of the pathnodes as described on the tutorial page "Setting up a monster".

But the animations won't play, how come?


RE: Grunt Animations - zombiehacker595 - 04-03-2012

(04-03-2012, 10:51 AM)Dutton Wrote: So today i got a bit curious after reading a post on the forums, and decided to make a small test map. containing a corridor with a metal table and a resized cabinet.

Now what is supposed to happend is that i pickup a key and a grunt will spawn with disabled triggers. and it should play an animation when reaching the first pathnode, which was "run.anm".

Here is my hps file:



void OnStart()
{
SetEntityCallbackFunc("activategrunt", "startgruntrun");
}

void startgruntrun(string &in asEntity, string &in type)
{
SetEnemyDisableTriggers("servant_grunt_1", true);
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "run.anm");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "notice1.anm");
}

The animations are included at the end of the pathnodes as described on the tutorial page "Setting up a monster".

But the animations won't play, how come?

wait so do you just want him to spawn when you pick up ibject then he runs at you?



RE: Grunt Animations - Dutton - 04-03-2012

(04-03-2012, 12:23 PM)zombiehacker595 Wrote: wait so do you just want him to spawn when you pick up ibject then he runs at you?

Nope, when he spawns on the item pickup he should be running from the first PatrolNode to the other. he isn't supposed to attack anyone just run from 1 point to another.

EDIT: Problem is that as a standard he just walks from point to point, but i want him to be running, if it's even possible?


RE: Grunt Animations - RedMser - 04-03-2012

Remove the extension. In the script of justine they also used an animation, this is their script:


AddEnemyPatrolNode("enemy_suitor_4", "PathNodeArea_30", 10.0f, "IdleExtra1");

You see the animation has no extension. That is your problem.


RE: Grunt Animations - Obliviator27 - 04-03-2012

From what I can tell, you want him to run. For that, you'll have to edit his .ent file and play with the runspeeds and accelerations so that he goes into "Run" state much faster.



RE: Grunt Animations - Statyk - 04-03-2012

If not have the extension doesn't fix it, try putting the extension "run.dae_anim"..

Just a thought =\


RE: Grunt Animations - Your Computer - 04-03-2012

The assumption is the thought that the animation parameter will actually do something in practice. Even if we were to assume that the animation at the patrol node feature is implemented, there are still the many animation conditions that the game goes through with the monster, which are listed in the model editor for the grunt type, which could conflict with the desired animation at the patrol node.

In other words, if you want the entity of grunt type to force the run animation, you'll have to edit the walking speeds, possibly the acceleration speeds, walk-to-run speed, etc, of the entity.


RE: Grunt Animations - Dutton - 04-04-2012

So to make the grunt run from 1 node to another i need to edit its .ent file? there is simply no other way?