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 Grunt Animations
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#1
Grunt Animations

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?

[Image: 15isy6C]
04-03-2012, 10:51 AM
Find
zombiehacker595 Offline
Member

Posts: 141
Threads: 51
Joined: Mar 2012
Reputation: 3
#2
RE: Grunt Animations

(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
Find
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#3
RE: Grunt Animations

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

[Image: 15isy6C]
(This post was last modified: 04-03-2012, 04:35 PM by Dutton.)
04-03-2012, 04:33 PM
Find
RedMser Offline
Junior Member

Posts: 40
Threads: 12
Joined: Mar 2012
Reputation: 1
#4
RE: Grunt Animations

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.
04-03-2012, 06:43 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#5
RE: Grunt Animations

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.

04-03-2012, 07:46 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#6
RE: Grunt Animations

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

Just a thought =\
04-03-2012, 08:37 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: Grunt Animations

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.

Tutorials: From Noob to Pro
04-03-2012, 08:44 PM
Website Find
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#8
RE: Grunt Animations

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

[Image: 15isy6C]
04-04-2012, 11:38 AM
Find




Users browsing this thread: 1 Guest(s)