Search the Community
Showing results for tags 'explanation'.
Found 2 results
-
Animation - explanation of the magic behind
smookie posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Having received a lot of PMs regarding setting up animations, I decided to start up this thread to try and explain all the magic stuff behind it. I will try to keep this post updated with all the variables and examples but I would prefer being asked questions here in public so that i can explain each of them. This is something I do in my spare time so please bear with me if I dont reply instantly, thank you :) For starters: 1. Configuring animation Lets say we have an animation that begins in Default Weapon Raised Standing position (the one you enter game when placing soldier in editor). Its an anim of holding rifle with one hand with the other hanging on the side. You are able to shoot in this position. It lasts for 5 seconds and returns to default pose. config.cpp . class CfgMovesBasic; // Reference CfgMovesBasic. This class is used by ArmA3 to store Actionsets, which will be covered at later time class CfgMovesMaleSdr: CfgMovesBasic // Override CfgMovesMaleSdr class in which all animation states and gestures are stored. You can also make your own class but you need to make sure your unit will be using it. . Usually leave as is. { skeletonName="OFP2_ManSkeleton"; // Skeleton indication. If you are doing animations for a T-rex, you will obviously use your custom skeleton for all moves. . Usually leave as is. gestures="CfgGesturesMale"; // Gestures class. Again, if you are using custom class, change it. Usually leave as is. class States { class AmovPercMstpSrasWrflDnon; class MyAnimation : AmovPercMstpSrasWrflDnon { looped = 0; // if set to 1, engine will copy first keyframe to last keyframe, resulting in more "looped" motion. for non looping movement, ALWAYS DISABLE speed = -5; // if speed is entered as positive number, it will mean it will last for 1/speed seconds (if 0.25, it will last for 4s). You can use negative number to indicate how many seconds should it last, in this example -5 will make it last 5 seconds file = "\myAddons\myAnimation"; // path to animation file. may or may not end with ".rtm", there is no difference canBlendStep = 0; // sliding effect on/off, we set it to off because we do not want character to move/slide in this move minPlayTime= 0.95; // the ratio of animation that is required to play, in this example: 95% of animation must be played before it can be interrupted // Interpolation - smooth blending to another state. We use it usually when we know that last keyframe is different to first keyframe of the target animation. If they are the same, use ConnectTo[] instead. InterpolateTo[] = { "AmovPercMstpSrasWrflDnon", 0.5 // First string is the class name of target animation, in this example this is default rifle standing pose. The number that follows is animation cost -> the engine will always look for the next target animation with smallest cost if there is more than one chain leading towards called action [again, actions will be explained later] // You can ignore the number (enter any float you want from 0 to 1) if: /// there is only one way leading to target action /// there is no animation chain involved }; } } } Variables file [values: any | string] - path to animation file. may or may not end with ".rtm", there is no difference looped [values: 0,1 | integer] - if set to 1, engine will copy first keyframe to last keyframe, resulting in more "looped" motion. for non looping movement, ALWAYS DISABLE speed [values: (-inf, inf) | float] - if speed is entered as positive number, it will mean it will last for 1/speed seconds (if 0.25, it will last for 4s). You can use negative number to indicate how many seconds should it last, in this example -5 will make it last 5 seconds canBlendStep [values: 0,1 | integer] - sliding effect on/off minPlayTime [values: <0,1> | float] - the ratio of animation that is required to play before it can be interrupted Arrays InterpolateTo[] [values: alternating "String", float+] - smooth blending to another state. First string is the class name of target animation, in this example this is default rifle standing pose. The number that follows is animation cost -> the engine will always look for the next target animation with smallest cost if there is more than one chain leading towards called action. You can ignore it unless you are working towards improving connection between states that are links away in the chain Please post your questions below. I will try to explain all the variables, arrays and problems as soon as possible. Good luck :)- 121 replies
-
- 3
-
- animation
- explanation
-
(and 1 more)
Tagged with:
-
I know the different sleeping animations, but I can't seam to get my player to start the mission sleeping inside the tent. I want my player to be lying down inside the old camping tent. How do I do this?
-
- animation
- explanation
-
(and 1 more)
Tagged with: