Skull5 Posted August 7, 2016 Share Posted August 7, 2016 Does anyone know the command to play an animation, and how to find animations in the files with the appropriate build, sg, and bank already there? I'm using a mod to play as a depth dweller, and I would like to go invisible, uninvisible, and then play the command of it coming down from the ceiling. Link to comment https://forums.kleientertainment.com/forums/topic/69387-animation-play-command/ Share on other sites More sharing options...
PanAzej Posted August 7, 2016 Share Posted August 7, 2016 Look into stategraphs folder. All animations are listed there and if builds are being switched you will see that in the code. I've looked into SGspider.lua for you, and the animation you're looking for is called "enter". To force playing an animation, you need to be an admin and if you're the host, type in the console: ThePlayer.AnimState:PlayAnimation("enter", false) (the false/true at the end is for looping. If you want the animation to loop, put 'true' in there instead of 'false') You could also just force the stategraph to go into this state. To do that, if you're the host, write: ThePlayer.sg:GoToState("dropper_enter") If you're an admin but you're not hosting or are hosting a dedicated server, then you either need to type your AllPlayers player number instead of ThePlayer or find yourself through the prefab name, or use the command to get entity under mouse while you're hovering over... I haven't toyed with things like these because I rarely screw around with commands like that, so I can't say exactly, but uncle google should be able tell you better anyways. Edit: Also, not 100% sure if anims/stategraphs aren't changed in that mod, so there's a chance things I've written won't work. Link to comment https://forums.kleientertainment.com/forums/topic/69387-animation-play-command/#findComment-801292 Share on other sites More sharing options...
Skull5 Posted August 7, 2016 Author Share Posted August 7, 2016 Is there a way to make animations play backwards? By the way, thanks for your help, never would have got this done without you. Now I can live my dreams of being a depths dweller. Link to comment https://forums.kleientertainment.com/forums/topic/69387-animation-play-command/#findComment-801301 Share on other sites More sharing options...
PanAzej Posted August 7, 2016 Share Posted August 7, 2016 11 minutes ago, Skull5 said: Is there a way to make animations play backwards? By the way, thanks for your help, never would have got this done without you. Now I can live my dreams of being a depths dweller. To my knowledge, there's no way to do that (maybe somebody will prove me wrong). If you want to be invisible/hidden, you could always switch to build/bank that doesn't exist and switch back when you want to be visible... To do that, type: ThePlayer.AnimState:SetBank("nonexistantbank") Now you're invisible. ThePlayer.AnimState:SetBank("spider") Now you're visible again. You could toy with the anim changing/switching banks to get the effect you need. Link to comment https://forums.kleientertainment.com/forums/topic/69387-animation-play-command/#findComment-801303 Share on other sites More sharing options...
Skull5 Posted August 7, 2016 Author Share Posted August 7, 2016 My friend, (we are both testing out things) Wanted to know if sound could be played alongside the command as a type of "state" command. Link to comment https://forums.kleientertainment.com/forums/topic/69387-animation-play-command/#findComment-801304 Share on other sites More sharing options...
PanAzej Posted August 7, 2016 Share Posted August 7, 2016 Well, by forcing stategraph with the command I mentioned in my first post, the sound should play on its own. Though, if you want to force it to play manually, type: ThePlayer.SoundEmitter:PlaySound("dontstarve/creatures/spider/descend") Link to comment https://forums.kleientertainment.com/forums/topic/69387-animation-play-command/#findComment-801305 Share on other sites More sharing options...
Mobbstar Posted August 9, 2016 Share Posted August 9, 2016 Btw, you can hide yourself and your shadow using ThePlayer:Hide() and ThePlayer:Show() This might interfere with things like combat, be wary. Link to comment https://forums.kleientertainment.com/forums/topic/69387-animation-play-command/#findComment-801879 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.