Gundabad Posted January 18, 2021 Share Posted January 18, 2021 How do you setup sprint and crouch animations on an empty template project? By default, if you set an animation name to certain predefined keywords like root, run, side, etc. Those animations are bound to default (no key), w or up arrow key, a or left arrow key etc and play when those keys are triggered in game. The manual says that sprint is tied by default to left shift and crouch to left control. However, just setting an animation to sprint_forward or crouch_forward does not by itself make it play when those keys are pressed. In fact, by default, the character will not even enter those modes at all, regardless of the animations, as the adjustments to the datablock settings for sprint and crouch speeds do not take effect either when those keys are used. What is necessary to do in order to setup sprint and crouch to work within a new, from scratch, empty template project? Quote Link to comment Share on other sites More sharing options...
Duion Posted January 19, 2021 Share Posted January 19, 2021 That is probably a complicated issue.What exactly did you do? Did you write your player scripts, player datablock and player animation scripts from scratch or did you copy them over?It is hard to tell where the issue is, without knowing your codebase.My first assumption would be that you are confused by the way Torque does those player stats, since they are hard coded, you cannot really set an image state or animation from the scripts, thats not possible without engine modifications, but you are not supposed to do it like that anyway.The engine does not set animations, it uses a state machine to define in which state a player or weapon is, the animation is just optional, you can set which animation to play in the state machine, but the player also works without animations, including sprinting, crouching etc. Quote Link to comment Share on other sites More sharing options...
Gundabad Posted January 27, 2021 Author Share Posted January 27, 2021 Sorry if I made the question seem like I was doing something more complicated than I am. I built a project from an empty template. I did not add any scripts that are not specified in the empty template setup and I did not remove any scripts that were. I imported a model and set up the animations for the default state with root, run, side, etc. I think what I am trying to figure out how to trigger the switch into the sprint or crouch state mode since holding or tapping left shift and left control seem to have no effect on the animation or enact the configuration for sprint and crouch (speed, strafe, etc) as setup in the datablock. Quote Link to comment Share on other sites More sharing options...
Duion Posted January 27, 2021 Share Posted January 27, 2021 It is hard to debug, if we do not know what code you are actually using, maybe you could post it.Otherwise I would advise to use the full template or at least copy over the working scripts which you need and then remove the stuff you do not want, it is easier that way around then to build from an empty template, the empty template is more for experienced users.Apart from that you should keep in mind that the template system will be changed completely in the future and will be replaced by a module system, which is similar to your empty template, but you can add modular features such as a player. I would suggest trying out Torque 4.0 development and if you still cannot get your player to work, you can complain to the developers, so they can help you and eventually it will help getting version 4 more stable and usable. Quote Link to comment Share on other sites More sharing options...
bsisko Posted February 28, 2021 Share Posted February 28, 2021 @Duion, Is Torque 4.0 avialable for use. Where can a person download it? Quote Link to comment Share on other sites More sharing options...
Duion Posted March 1, 2021 Share Posted March 1, 2021 It is here: https://github.com/TorqueGameEngines/Torque3DBranch: Preview4_0But it is not usable yet, where you can get the precompiled build I forgot, they managed to hide everything well. 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.