Jump to content
The Dark Mod Forums

func_animate


Arcturus

Recommended Posts

Thus far that is black magic over here. I'd reach out to Solarspace since he knows how to get that working.

 

Since he doesn't visit here that much these days, you could try contacting him over at Doom3world, the Hexen EOC mod website, the Hexen EOX moddb page or the Arx End of the Sun moddb site.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I know little about this but I have seen it working in an unreleased map where the func_animate is just given the anim property with the name of the anim plus its model must be an md5mesh with its relevant md5anim files. The func_animate is then targetted from any trigger to work it.

 

Other relevant properties:

 

start_anim = anim to start with, eg, idle

 

blend_in = the time in seconds to transition from the start_anim to the anim, eg, 0.25.

 

cycle = the number of times to repeat the anim. Use -1 for endless repeats.

Link to comment
Share on other sites

I created func_animate (create entity -> func -> func_animate) and then added properties:

 

model models/md5/chars/guards/proguard/tdm_ai_proguard.md5mesh
start_anim models/md5/chars/guards/proguard/idle.md5anim

But map wont load. It says it can't find anim models/md5/chars/guards/proguard/idle.md5anim.

Same with other md5mesh.

It's only a model...

Link to comment
Share on other sites

Silly me. I was confused what func_animate really is. Let's say I have def for my fish:

 

model fish_animated_01 {
mesh		models/md5/chars/animals/Arcturus_fish.md5mesh
anim idle	models/md5/chars/animals/Arcturus_fish.md5anim
}
entityDef atdm:fish_animated_01
{
"editor_displayFolder"	"Nature"
"spawnclass"			"idAnimated"
"model"					"fish_animated_01"
"start_anim"			"idle"
}

 

I can then add new animation, let's call it jump:

 

model fish_animated_01 {
mesh		models/md5/chars/animals/Arcturus_fish.md5mesh
anim idle	models/md5/chars/animals/Arcturus_fish.md5anim
anim jump models/md5/chars/animals/Arcturus_fish_jump.md5anim
}
entityDef atdm:fish_animated_01
{
"editor_displayFolder"	"Nature"
"spawnclass"			"idAnimated"
"model"					"fish_animated_01"
"start_anim"			"idle"
"anim"  "jump"
}

 

This way fish will play idle animation in loop and when triggered will play "jump". I thought there had to be "func_animate" actually wrtitten somewhere in code.

 

 

It's only a model...

Link to comment
Share on other sites

To answer your question nbohr1more. You can write definition:

 

entityDef atdm:ambient_citywatch
{
   "editor_displayFolder" "AI/ambient"
   "spawnclass" "idAnimated"
   "model" "tdm_ai_citywatch"
   "start_anim" "idle"
}

 

And voilà!

 

post-2001-131620850072_thumb.jpg

 

It doesn't react to player, doesn't make any sounds, it's non solid and... it has no head. But it's there :)

It's only a model...

Link to comment
Share on other sites

Wow, that has potential for ambient AI. If I understand you correct, you could have an AI that is just standing there, but then starts walking forward when triggered? That would be great for ambient AI at the end of streets or in bars where they don't need to interact with the player. We'd just need a way to bind a head to them, but that should be doable.

 

This would be great for creating taverns full of sitting people without killing FPS, I imagine.

Link to comment
Share on other sites

If you just trigger walk animation it will make two steps and stop until triggered again. Then it will reset and repeat the same move. To make it walk a new animation would be needed with origin bone not moving (character walking in place). Then you can bind NPC to func_mover and to curve (just like fish in grass demo map). It's a lot more work than placing path corners.

It's only a model...

Link to comment
Share on other sites

Very interesting. Perhaps the head can be easily added by inserting it in the def same as it is in the normal AI defs.

 

There might be various possibilities. One I can think of is bringing statues alive which could probably be done with a stone skin then trigger it to animate and perhaps switch to a real AI with or without stone skin using a simple script to copy origin and orientation.

Link to comment
Share on other sites

Great work Arcturus!

 

Maybe a new Dark Radiant update can automate some of the setup for Func_Animate path construction? :unsure:

 

I think that md5anim preview in the latest version is going to get some heavy usage soon... :D

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 2 months later...

Haven't had any luck using this to create ambient AI yet...for some reason, def_attach doesn't work on these entities, so attaching heads has been a surprisingly annoying problem.

Link to comment
Share on other sites

I tried to simply bind head model to "Head" joint. It didn't work, apparently because it's an MD5.mesh and it needs an animation defined. So I tried to bind one of the existing head entities, with no luck. So I created def similar to the one in earlier posts:

 

entityDef atdm:ambient_head
{
"editor_displayFolder" "AI/ambient"
"spawnclass" "idAnimated"

"model" "head_female03"
"start_anim" "idle"
}

 

Binded it with the body:

 

bind atdm_ambient_citywatch_1
bindToJoint Head

 

head3h.png

 

And it worked:

 

head1bi.jpg

 

You can also bind any static models:

 

head2hc.jpg

It's only a model...

Link to comment
Share on other sites

I tried binding a static model, but the model didn't move with the rest of the body at all...it sat at shoulder level but didn't move as the body swayed back and forth. Did yours move properly?

Link to comment
Share on other sites

(Giving new meaning to the term, "pothead".)

 

I found the problem...there was a typo in my bindtojoint line so it wasn't actually bound to any particular joint that moved. Probably defaults to the origin.

Link to comment
Share on other sites

You've had better luck at this than I, Arcturus...I'm trying to get a func_animate AI to loop their idle animation, play a new animation (say coughing) when triggered, and then go back to their idle.

 

So far I've been able to do everything but the last step. After being triggered and playing their cough, they either disappear or freeze, no longer playing any animations at all. Have you had any success with anything like that?

Link to comment
Share on other sites

Unfortunately not, but I just found that adding

"cycle" "3"

Will loop the "anim". And if the "anim" is walk animation then model will not reset to its initial position each time but move forward. It makes setting a simple walk on a straight line very simple. I assume you already know this page: http://www.modwiki.net/wiki/Func_animate_(entity)

It's only a model...

Link to comment
Share on other sites

It makes setting a simple walk on a straight line very simple.

 

Cool. And since the func_anim is nonsolid, that could make a decent ghost walking through walls, wouldn't it?

Link to comment
Share on other sites

(Giving new meaning to the term, "pothead".)

 

I found the problem...there was a typo in my bindtojoint line so it wasn't actually bound to any particular joint that moved. Probably defaults to the origin.

 

Lol, yeah the one before it had 'broad shoulders'

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 1 reply
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...