arma:howto_animate_model
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
arma:howto_animate_model [2009/04/16 12:44] – added machine gun belt rotation quick tutorial. snakeman | arma:howto_animate_model [2016/11/04 22:30] – moved images from nekromantix to this domain. snakeman | ||
---|---|---|---|
Line 15: | Line 15: | ||
Besides adding selections (same as in OFP but in ArmA bone selections should never overlap) you also need to add a following named property to your first resolution LOD (press **ALT-P** to open named properties window): | Besides adding selections (same as in OFP but in ArmA bone selections should never overlap) you also need to add a following named property to your first resolution LOD (press **ALT-P** to open named properties window): | ||
- | < | + | < |
| | ||
| | ||
Line 47: | Line 47: | ||
A bone is defined by using two strings: | A bone is defined by using two strings: | ||
- | < | + | < |
:" | :" | ||
</ | </ | ||
Line 57: | Line 57: | ||
**Example** | **Example** | ||
- | < | + | < |
skeletonBones[]= | skeletonBones[]= | ||
{ | { | ||
Line 69: | Line 69: | ||
The second argument (empty in the example above) is used for linking two bones: | The second argument (empty in the example above) is used for linking two bones: | ||
- | < | + | < |
:" | :" | ||
</ | </ | ||
Line 77: | Line 77: | ||
**Example** | **Example** | ||
- | < | + | < |
skeletonBones[]= | skeletonBones[]= | ||
{ | { | ||
Line 89: | Line 89: | ||
You can not link more than two bones in a row! If you do something like | You can not link more than two bones in a row! If you do something like | ||
- | < | + | < |
" | " | ||
</ | </ | ||
Line 99: | Line 99: | ||
However, it should be possible to use a syntax like this (not tested yet): | However, it should be possible to use a syntax like this (not tested yet): | ||
- | < | + | < |
skeletonBones[]= | skeletonBones[]= | ||
{ | { | ||
Line 112: | Line 112: | ||
**cfgSkeletons Example** | **cfgSkeletons Example** | ||
- | < | + | < |
class cfgSkeletons | class cfgSkeletons | ||
{ | { | ||
Line 155: | Line 155: | ||
**Example** | **Example** | ||
- | < | + | < |
sections[]= | sections[]= | ||
{ | { | ||
Line 195: | Line 195: | ||
**Example** | **Example** | ||
- | < | + | < |
class mainRotor | class mainRotor | ||
{ | { | ||
Line 219: | Line 219: | ||
As a short example, the wheels would need " | As a short example, the wheels would need " | ||
- | {{http://tactical.nekromantix.com/images/wiki/ | + | {{http://pmc.editing.wiki/ |
**cfgModels example** | **cfgModels example** | ||
- | < | + | < |
class cfgModels | class cfgModels | ||
{ | { | ||
Line 396: | Line 396: | ||
Now something worth noticing, let's say that you want the belt to move not straight but unbalanced, for that you will play with the angle0 = "" | Now something worth noticing, let's say that you want the belt to move not straight but unbalanced, for that you will play with the angle0 = "" | ||
+ | |||
+ | |||
+ | ====== Animate Cargo Door ====== | ||
+ | |||
+ | In your model.cfg file in cfgModels put this for example: | ||
+ | <code cpp> | ||
+ | class Animations | ||
+ | { | ||
+ | class cargodoor | ||
+ | { | ||
+ | type = " | ||
+ | source = " | ||
+ | animPeriod = 2.5; | ||
+ | sourceAddress = " | ||
+ | selection = " | ||
+ | axis = " | ||
+ | memory = true; | ||
+ | minValue = 0; | ||
+ | maxValue = 1; | ||
+ | angle0 = 0; | ||
+ | angle1 = -0.488690; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | In config.cpp file in cfgVehicles put this: | ||
+ | <code cpp> | ||
+ | class AnimationSources: | ||
+ | { | ||
+ | class MoveX1 // Should be the same as your selection name. | ||
+ | { | ||
+ | source = " | ||
+ | animPeriod = 10; //The animation period used for this controller. | ||
+ | initPhase = 0; // | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | And | ||
+ | <code cpp> | ||
+ | class UserActions | ||
+ | { | ||
+ | class CargoDoor_OpenP | ||
+ | { | ||
+ | displayName = "Open cargodoor"; | ||
+ | position = " | ||
+ | onlyforplayer = false; | ||
+ | radius = 0.5; | ||
+ | condition = "this animationPhase "" | ||
+ | statement = "this animate ["" | ||
+ | }; | ||
+ | </ |
arma/howto_animate_model.txt · Last modified: 2024/08/01 15:57 by snakeman