Hello again,
Today it's time to learn how to create your own custom animation set, so let's delve right into it.
1) Preparing:
In the Editor place two units, one as the player and the other to test your animations and save the mission. Download my function, insert it into the mission folder, keep it open and then create a description.ext file and insert the following code:
2) Animations viewer:
Preview the mission. Once in game, press Esc and select the Animations button as seen in the image below.
3) Select animations:
You are now inside the animations viewer. On the top left you can see a Graphical User Interface with six drop down menus. The first will select the unit in which you wish to preview the animations while the others will let you browse all the animations currently in game. Navigate and choose one or multiple animations. You can copy each animation classname with Ctrl + C.
4) Insert animations:
You can now start inserting the animations into the function. Because of the large amount of code, an advanced text editor is recommend such as NotePad++.
a) Function header:
Before creating the animation set itself, you should choose a name for it and add it to the list in the header with a short description of it.
Example:
Remember RANGE_P_A is the classname I gave the set but you can name it whatever you want.
b) Debugger:
Add your animation set name to the list of acceptable sets, skipping this step will prevent you from using what you are creating. Search for "Error Messages" to find the list.
c) Create set:
Insert your animations into a custom set. Search for "Animations Sets" to find the beginning of the list. Description is optional but recommended.
Example:
If you want your animation set to be incompatible with primary weapons or backpacks change the corresponding field from false to true.
d)Save
Yup... I mentioned it.
5)Test the animation set:
Insert the following code into a unit init field...
Regards,
Flash
Today it's time to learn how to create your own custom animation set, so let's delve right into it.
1) Preparing:
In the Editor place two units, one as the player and the other to test your animations and save the mission. Download my function, insert it into the mission folder, keep it open and then create a description.ext file and insert the following code:
Code:
class CfgFunctions
{
class HK
{
class animations
{
class animationSet {file = "fn_animationSet.sqf";};
};
};
};
2) Animations viewer:
Preview the mission. Once in game, press Esc and select the Animations button as seen in the image below.
3) Select animations:
You are now inside the animations viewer. On the top left you can see a Graphical User Interface with six drop down menus. The first will select the unit in which you wish to preview the animations while the others will let you browse all the animations currently in game. Navigate and choose one or multiple animations. You can copy each animation classname with Ctrl + C.
4) Insert animations:
You can now start inserting the animations into the function. Because of the large amount of code, an advanced text editor is recommend such as NotePad++.
a) Function header:
Before creating the animation set itself, you should choose a name for it and add it to the list in the header with a short description of it.
Example:
Code:
>> SHOOTING RANGE...
...prone, performing occasional weapon checks.
> "RANGE_P_A"
Remember RANGE_P_A is the classname I gave the set but you can name it whatever you want.
b) Debugger:
Add your animation set name to the list of acceptable sets, skipping this step will prevent you from using what you are creating. Search for "Error Messages" to find the list.
c) Create set:
Insert your animations into a custom set. Search for "Animations Sets" to find the beginning of the list. Description is optional but recommended.
Example:
Code:
//...prone, awaiting order to fire at targets.
case "RANGE_P_A":
{
_anims =
[
"HubShootingRangeProne_move1",
"HubShootingRangeProne_move2",
"HubShootingRangeProne_move3"
];
_noWeapon = false;
_noBackpack = false;
};
If you want your animation set to be incompatible with primary weapons or backpacks change the corresponding field from false to true.
d)Save
Yup... I mentioned it.
5)Test the animation set:
Insert the following code into a unit init field...
Code:
[this,"MY_ANIMATION_SET"] call HK_fnc_animationSet;
Regards,
Flash