Johxz Posted June 19, 2016 Share Posted June 19, 2016 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? Quote Link to comment Share on other sites More sharing options...
irei1as Posted June 20, 2016 Share Posted June 20, 2016 I can't give you explanationes but here are my confusing experience. I would love explanations, tooI'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 workedfunction AIPlayer::do_atk(%this){ %this.setActionThread("bellyhit");} Quote Link to comment Share on other sites More sharing options...
Johxz Posted June 23, 2016 Author Share Posted June 23, 2016 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.pngand 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 Quote Link to comment Share on other sites More sharing options...
Steve_Yorkshire Posted June 25, 2016 Share Posted June 25, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.