Jump to content

setActionthread vs playthread


Johxz

Recommended Posts

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?

Link to comment
Share on other sites

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)


bob.destroyThread(0);

bob.playThread(0,"punch");


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

%obj.setActionThread("Death1");

...


and also worked


function AIPlayer::do_atk(%this)

{

%this.setActionThread("bellyhit");

}

Link to comment
Share on other sites

hey @irei1as thanks!


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)


http://i.imgur.com/e4PHscP.png


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:



@irei1as I found this links to help us

- https://www.garagegames.com/community/forums/viewthread/93571/1#comment-631013

- http://www.garagegames.com/community/forums/viewthread/75574/1#comment-706009

- http://www.garagegames.com/community/forums/viewthread/1479

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...