[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5150: file_get_contents(https://freedomsponsors.org/api/project/294): failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway
setActionthread vs playthread - Forums | Torque 3D

setActionthread vs playthread

Scripting questions, discussions, etc
4 posts Page 1 of 1
Posts: 395
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Mon Jun 20, 2016 12:26 am
when they should be use?

I want to play an attack animation, playThread seems to work, but only for "attack1", for some reason the "attack2" don't play. In the shape editor I can play any animations.

bob.playThread(0, "attack1");
bob.playThread(0, "attack2");

This don't work.

bob.setActionThread( "attack1", true, true);
bob.setActionThread( attack, 1);

Can anyone how would be use this two? and example of how can use it?
Posts: 66
Joined: Fri Feb 27, 2015 5:13 pm
by irei1as » Mon Jun 20, 2016 10:12 am
I can't give you explanationes but here are my confusing experience. I would love explanations, too

I've used and worked for the main player (class AIPlayer, 3rd person beat'em up thing)


But take in account that punch animation is a blended animation. If it were not then just walking would stop the animation. It's a pain if you want to kick.

I had problems with setActionThread doing "punch" and walking with the main char. But for NPC (class AIPlayer) this worked:

function SlimeData::onDisabled(%this, %obj, %state)
%obj.stop(); //so the death doesn't move

and also worked

function AIPlayer::do_atk(%this)
Posts: 395
Joined: Sat Feb 07, 2015 11:37 pm
by Johxz » Thu Jun 23, 2016 4:59 am
hey @
User avatar

BTW I managed the problem I did something in my animation.cs I think it was copy and renamed some animations and something screw up anyway....

I empty that file and then added all animation again, for me I don't have blend animation, I have one file per animation (.dae)


and now can do some testing from the console... just fine..

new AIPlayer(EnemyBob) { datablock="EnemyData"; position=localclientconnection.camera.getPosition(); };

EnemyBob.playThread(0, "attack1");

EnemyBob.playThread(0, "attack2");

setActionThread never work for me... I need to do more test, sure I miss something. If anyone can trow some enlightenment :roll:

User avatar
I found this links to help us
- https://www.garagegames.com/community/f ... ent-631013
- http://www.garagegames.com/community/fo ... ent-706009
- http://www.garagegames.com/community/fo ... hread/1479
Posts: 191
Joined: Tue Feb 03, 2015 10:30 pm
by Steve_Yorkshire » Sat Jun 25, 2016 2:36 pm
Just to note, movement animations will overrule and disable scripted animations, so if the AI/Player is moving they won't play the animation. You could mount an invisible weaponImage and have the animation play as a recoil animation.
4 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest