Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Grunt Animations
Author Message
Dutton Offline
Member

Posts: 121
Joined: Apr 2012
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
zombiehacker595 Offline
Member

Posts: 141
Joined: Mar 2012
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
Dutton Offline
Member

Posts: 121
Joined: Apr 2012
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
DoubleThinking Offline
Junior Member

Posts: 32
Joined: Mar 2012
Reputation: 1
Post: #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.

The picture was taken with a 1337x1337 camera resolution and then resized to 42x42. The results are blending, as seen in my avatar.
04-03-2012 06:43 PM
Find all posts by this user Quote this message in a reply
Obliviator27 Offline
Posting Freak

Posts: 801
Joined: Jul 2011
Reputation: 65
Post: #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 all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 4,186
Joined: Sep 2011
Reputation: 230
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,474
Joined: Jul 2011
Reputation: 234
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Dutton Offline
Member

Posts: 121
Joined: Apr 2012
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)