UseAnim

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Elgan
Site Admin
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

UseAnim

Post by Elgan »

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?
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

This thing do not appear in Radiant. It's prob a SH, BT stuff...but in the g_allclasses, it have:

anim( String animName )

set the animation to use for player.

Sounds very promissing :D ! I'm trying to make players (not bots) do some stuff in AA...
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

func_useanim

Post by tltrude »

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.

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.



******************************************************************************/
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.
Tom Trude,

Image
Post Reply