UseAnim
Moderator: Moderators
UseAnim
hey i was reading though the classes and i read UseAnim and some of its cmd's and things look nice and pretty. i was going to experiment with it. but just before i do. does anyone know what it's for and what it does?
func_useanim
Acttually there is a func_useanim for games that use the Q3 game engine. Copy and paste this to Notepad and save it as "main/code/trigger_useanim.cpp", or whatever name you want, and it will show up in radiant. The code folder does not have to be included in a mod pk3--if it even works at all.
I have no idea if it will even work in mohaa. To use it, you would probably make a brush with trigger texture and then turn it in to a func_useanim. As you can see there is also a func_useanimdest. My guess is that they would be used in singleplayer to make a player turn a valve, or pick up a crate, move it to the destination, and then drop it.
Good luck, and post your results if you get it to work.
Code: Select all
/*QUAKED func_useanim (0.75 0.65 0.1) ? VISIBLE TOUCHABLE CONTINUOUS
tltrude's comments/information:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description:
------------
This object allows you to place the player into a specific animation for the
purposes of using an object within the world.
This object should point at a func_useanimdest which contains specific
information about how the player is supposed to be posed.
Spawnflags:
===========
None !
Values:
=======
"anim" ( String animName)
set the animation to use for player.
"camera" ( String cameraPosition )
set the camera to use when in this animation.
topdown, behind, front, side, behind_fixed, side_left, side_right.
"count" ( Integer newCount )
Sets how many times the UseAnim can be triggered.
"delay" - how long it takes to be re-triggered. ( default 3 seconds )
"doTouch" ( Entity touchingEntity )
sent to entity when touched.
"key" ( String keyName )
The item needed to activate this. (default nothing)
"num_loops" ( Integer loopCount )
set the number of times to loop an animation per use.
"state" ( String stateName )
set the state to use for the player.
"triggertarget" ( String targetname )
Sets what should be triggered, when this UseAnim is triggered.
Functions:
==========
VISIBLE - if this is checked the trigger itself will be visible
TOUCHABLE - if this is set we can activate the trigger by standing in it.
CONTINUOUS - if this is checked the thing will re-trigger continously, otherwise
it waits until the player has left the trigger field.
Internal Engine Use:
====================
None !
Not sure ?:
===========
None !
******************************************************************************/
/*QUAKED func_useanimdest (0.75 0.65 0.1) ?
tltrude's comments/information:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Description:
------------
This object should be targeted by a func_useanim and contains specific
information about how the player is posed when he arrives.
"anim" ( String animName)
set the animation to use for player.
"num_loops" ( Integer loopCount )
set the number of times to loop an animation per use.
"state" ( String stateName )
set the state to use for the player.
******************************************************************************/
Good luck, and post your results if you get it to work.

