Game Development Community

Does ShapeBaseImageData support multiple animation threads?

by Shai Perry · in Torque Game Engine · 09/22/2006 (12:27 pm) · 10 replies

From what I understand, it only supports one thread. So say you have an animation of the gun idling, the fire animation will "replace" the thread and not necessarily blend with it, is this correct?

#1
09/22/2006 (12:31 pm)
Yup, correct.

Though I do recommend looking at how spinThreads work if you're interested in playing multiple threads at once.
#2
09/22/2006 (12:33 pm)
I always thought shapebaseimages couldnt be animated. how are they animated? can they be animated by simply animating the node it's mounted on? is this the 'recoil' animation youre talking about?
#3
09/22/2006 (12:36 pm)
Thanks stefan for the quick reply.
sean, shapebaseimages are just the state system weapons (or other systems) use, they have a .dts associated with them, so each state can have an animation attached to it.
i.e., for state2 i'd have "sequence[2] = "idle";"
#4
09/22/2006 (1:19 pm)
@Sean H

The default way to animate weapons in ShapeBaseImages is to animate the weapon model itself, and not really the player node. So the 'recoil' animation you mention would actually be performed by animating the rifle to appear to be recoiling, exporting that to Torque and playing that animation as part of the ShapeBaseImage

--Amr
#5
09/22/2006 (1:38 pm)
Thanks Shai and Amr. I didnt know thats what the sequence[] was for. thats good to know.

considering the default way of animating weapons in torque, shouldnt there also be an animation for the player model itself? I ask this because when i look at the default player while firing a weapon, it's not just the weapon which experiences the recoil, the player is animated as well. one of the default player animations is called "recoil" Im pretty sure this comes into play as well...
#6
09/22/2006 (2:09 pm)
Hmm...this is something I've been looking into myself - I don't think it is possible in TGE to animate the player as well unless you use the recoil animation to do that. This was a problem that faced people who tried to do implement a melee system - you needed the ability to play an extra animation for the melee weapon slash, so this has been implemented in the source code for those systems.

--Amr
#7
09/24/2006 (3:37 am)
Aye Sean, for stuff to look good from 3rd person (and 1st too if you have visible parts of the player in view) you should animate the player too. Just animating the weapon in a reload animation will make it float, for instance.
#8
09/24/2006 (6:02 am)
@Stefan: is it possible for you to outline a/the process for getting the ShapeBaseImage to force a player animation for just such States[reloading, etc] beyond the recoils? I've tried and tried but I can't seem to get the right combination of Blend/armThread/actionThread/playThread to get it looking/working right? I can get a weapon posed in the player's HUD no problem and keep it there,see here; it's in getting the player doing anything else[outside recoiling] correctly I can't get a handle on yet. Seems like once you mount a weapon, it more/less takes over for the player avatar...meaning they seem to do more than the player avatar does...

Thanks
#9
09/24/2006 (6:49 am)
Not sure what you are asking here Rex, can you rephrase?

I just took the recoil code and made some small modifications to it, and used it for reloading/activate/deactivate. I'm not sure why playThread wouldnt work for you. Is the problem that you cannot keep it in sync with the imageThread?
#10
09/24/2006 (7:04 am)
For me, it is more an issue of "is it a blend sequence played as an armThread or a regular sequence played as an actionThread, or as a playThread"??

I know that if you have a sequence named one of the recoils, it forces the player to play the sequence. Is it as simple as giving the player a sequence with a weapon's State sequence name?

Or does it need to be setup as the player's celebration/suicide sequence with the Server command structure?

This is where I can't figure out how to make the player react to the weapon/items with an Image state machine...

Thanks for helping an artist understand. BTW; for me it has to be script based, as I'm not a compiler of Source code. So for example: What type of sequence do you create & how would you get this player sequence to be run by the player avatar for a reload State?

sequence[31] = "./player_reloadPistol.dsq reloadPS";