id Tech Forums

id Tech 4 (Doom3/Prey/Q4) => id Tech 4 Scripting => Topic started by: argoon on September 24, 2016, 06:34:29 PM

Title: help with func_animate
Post by: argoon on September 24, 2016, 06:34:29 PM
Hello again guys like i referred in the "help with script thread" the func_animate object hides it self after playing the "anim1" "anim2" animations how can i disable that? Is it even possible without messing with the engine or game source code?

here is the entity definition.


model env_smwoodTable {
mesh models/md5/furniture/smwoodTable.md5mesh
anim idle models/md5/furniture/smwoodTable_idle.md5anim
anim open models/md5/furniture/smwoodTable.md5anim {
frame 1 sound storagecabinet_open
}
anim close                      models/md5/furniture/smwoodTable_close.md5anim {
frame 1 sound storagecabinet_close
}
}

entityDef env_smwoodTable {
"editor_color" "1 .5 0"
"editor_mins" "-16 -16 0"
"editor_maxs" "16 16 64"

"inhrit"             "func_animate"
"spawnclass" "idAnimated"
"model" "env_smwoodTable"
"frob"                  "1"
"start_anim"            "idle"
"num_anims"             "2"
"wait"                   "-1" //how long to wait before auto activating.  -1 means only activate when triggered.
"anim1" "open"
"anim2" "close"

"combatModel" "1" // collision based on the md5 mesh (bad for performace use AF's when possible)
//"bleed" "0"
//"mtr_wound_metal" "textures/decals/bullethurt"
//"snd_metal" "bullet_impact_flesh"
"sound_bone" "origin"
Title: Re: help with func_animate
Post by: The Happy Friar on September 25, 2016, 05:21:03 PM
I want to say most of what you can do with a func_animate is in the entity in the editor.  I can look in the morning when I have more time, but I want to say a func_animate is meant for cutscenes & would be replaced by another entity when the cut scene ends & the player has control again.
Title: Re: help with func_animate
Post by: argoon on September 26, 2016, 08:42:27 AM
Yes it seams so, i see no way to disable the hidden state either, is a petty it does work like a charm for what i want it to, simple on off animations, if only it didn't go away. Perhaps i could inherit from idactor instead?


Edit: it seams func_door is what i could use in this case but then i don't need to use a animated md5 model and it seams that is how the TDM guys do their stuff as well.
Title: Re: help with func_animate
Post by: The Happy Friar on September 27, 2016, 06:40:45 AM
When I've wanted to do an animated model that has collision I've cheated and made a new monster with almost no AI & have it play the animation I want. 


I know, cheating, but it worked.  :)
Title: Re: help with func_animate
Post by: Ivan_the_B on September 29, 2016, 01:43:45 PM
I think you should add the idle animation as 3th in the list and set "loop_last_anim" "1".
Or simply set "remove" "0", but I think it won't play any animation.