Frictional Games Forum (read-only)

Full Version: Grunt Animations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
(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?
(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?
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.
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.
If not have the extension doesn't fix it, try putting the extension "run.dae_anim"..

Just a thought =\
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.
So to make the grunt run from 1 node to another i need to edit its .ent file? there is simply no other way?