• No results found

5.56 - The animation command

In document Arma 3 Editing Guide (Page 138-143)

Randomanimation

Here are several variants possible, but we will use only 2 of them. At first there´s the variant that the Animations are numbered like the Panic-Animation which is numbered form ActsPercMstpSnonWnonDnon_Panicking1 till 7. It´s important to make sure that the names are always the same. The numbers are the only thing which are different to each other.

Name playMove format ["Animation%1",ceil random 7];

Getting random animations out of an array

The other Variant is that the engine is selecting an Animation automaticaly out of an Array.

The advantage is that one can predefine some different Animations in this Array. That happens usualy by using a script, which looks like this:

[Name] exec "scripts\animation.sqs"

The animation status

The animation status shows the user whether the Animation is still running or already been ended. One can use this information of course for further things like conditions.

? animationState _Unit == "Anim1" : hint “Anim runs”

Ignoring end of Animation

Who doesn’t know that, that a unit is disabling the current animated position and is changing back to the default position. That happens right then when the current Animation has been ended. But if one likes that a unit has to keep being in the animated position so the DisableAI-command is needed.

To do this one needs to give the syntax for the respective Animation at first and right behind the DisableAI-command which will look like this:

NameplayMove "Animation"

NamedisableAI "Anim"

If its needed now that the unit has to change back to the default position and has to adopt an attitude so one has to use the following Syntax:

NameenableAI "Anim"

A further possibility to get a Animation loop is the using of a Eventhandler.

NameswitchMove "Animation";

NameaddEventHandler ["AnimDone", {NameswitchMove "Animation"}];

_Unit = _this select 0

_Anim = ["Anim1", "Anim2", "Anim3", "Anim4", "Anim5", "Anim6"];

_Unit playMove ( _Anim select floor(random((count _Anim) -0.5 )));

exit;

Chapter 5 A list with the most used commands will be shown on the list below:

Animation Description

SprintBaseDf(SprintBaseDfL=rennt links / SprintBaseDfR rennt rechts) SprintCivilBaseDf (SprintCivilBaseDfL=links / SprintCivilBaseDfR=rechts) AmovPercMstpSnonWnonDnon_AwopPercMstpSoptWbinDnon

Lying and thows a grenade Thows a grenade Kneels down on one knee Hands behind the head Unit puts a pipebomb Sitting down

Kneels down and gasps Kneels down and gasps Heal Animation Heal Animation Heal Animation Heal Animation Bandaging a victim

Victim lays on the ground Forward guys!

Animation Description

AmovPsitMstpSlowWrflDnon_WeaponCheck1 (Number 1 to 2) AmovPsitMstpSnonWnonDnon_ground

ActsPpneMstpSnonWnonDnon_Injured1 (Number 1 to 2) ActsPknlMstpSnonWrflDnon_TreatingSoldier

ActsPercMwlkSlowWrflDnon_PatrolingBase1 (Number 1 to 4) ActsPercMstpSlowWrflDnon_Lolling

ActsPercMstpSnonWnonDnon_DancingDuoIvan ActsPercMstpSnonWnonDnon_DancingDuoStefan ActsPercMstpSnonWnonDnon_DancingStefan ActsPpneMstpSnonWnonDnon_Panicking

ActsPercMstpSnonWnonDnon_Panicking1 (Number 1 to 7) ActsPercMrunSlowWrflDf_TumbleOver

ActsPknlMstpSlowWrflDnon_ThingPassingMoving ActsPercMstpSlowWrflDnon_Listening

ActsPercMstpSnonWnonDnon_Listening

ActsPercMstpSnonWnonDnon_Talking1 (Number 1 to 2) ActsPercMstpSlowWrflDnon_Talking1 (Number 1 to 2) m2s1kancler

Sitting, checking the weapon Sitting/Hands back

Sitting / Weapon on ist fold Questioning

Victim of questioning Arresting a person Victim of arresting Lying fettered

Got hit and lying on the ground Convulsed with pain

Convulsed with pain Healing injured within battle Cowering and giving orders Cowering and listening to orders Kneeing on the ground and talking Running and rolling forward Go go go Stumbling but going on Running cowered and securing Listening to responsiveness Listening to responsiveness Standing without weapon and talking Standing with weapon and talking Running / giving order Standing and listening Standing and talking Standing and aiming

Animation Description

Standing / aiming from hip

Lifting hands / protecting themselves Standing with gun in hips

Holding weapon with gun barrel up Running around scared

Standing with hands up and falling Standing inflected forward Leaning to someone Weapon in hip and pitching Standing with folded arms Holding weapon on board carrier

Holding weapon near be hips and giving orders Holding weapon up on hips

Holding weapon right in front of his chest Got hit lying on the ground

Holding weapon at board carrier and giving orders Walking around, weapon shouldered and gesticulating Throwing hands up and capitulate

Standing with shouldered weapon Standing with folded arms Standing with folded arms Running around

Running around and gesticulate Running around and gesticulate Standing and listening

Running around and gesticulate Running around and gesticulate Standing, gesticultaing and folding arms Watching the ground and running around Standing with hand at the chin

Standing with hand at the chin and gesticulating Running forward and is telling

Folding Hands and explaining

Crying for help and pointing somethings with hands Standing with lifted weapon

Standing with lifted weapon

Standing with lifted weapon and gesticulating Standing with lifted weapon and running Standing with lifted weapon and gesticulating Standing with lifted weapon and gesticulating Running with weapon under the arm and gesticulating Standing with weapon under the arm

Running with lifted weapon

Running with weapon in the front of his body Lifting weapon and putting hand on ist back Lifting weapon with hands on ist magazine

Chapter 5

By using the following syntax it’s possible to disable the AI units. That means that those units will not fire and not move. The following possibilities are available:

NamedisableAI "Move" - Unit stops moving

NamedisableAI "Target" - Unit is no longer observing enemy units NamedisableAI "Autotarget" - Unit doesn’t watch anything

NamedisableAI "Anim" - AI is no longer able to change any animation NamedisableAI "Watch" - Unit is no longer looking around

By using enableAI all the effect will get deleted and the unit is behaving normal again.

This order is quite useful to make objects or units move over the map. If one wants to generate an aircraft which has to be in the air when it has been generated, this order will make it move in a pre-defined direction so that the pilot has time to speed up his aircraft.

To do this just use following syntax:

NamesetVelocity [0,100,100]

By using the following syntax it's possible to get some information displayed on the screen. There are several possibilities to do this:

hint "Text" - Text appears after call

hintC "Text" - Text appears after call and the game will be paused hintCadet "Text" - Appears in Cadet mode only

If a unit is changing his position and stance when he should be holding still, the following commands can be used to hold the unit in place in a specific stance. The orders kneel and kneelDown are intended on the part of BI but they don’t really work up to version 1.14. But those commands shall work in further versions so you can get the needed syntaxes below:

NamesetUnitPos "Up" - Unit keeps standing NamesetUnitPos "Middle" - Unit is kneeling NamesetUnitPos "Kneel" - Unit is kneeling

NamesetUnitPos "KneelDown" - unit is kneeling and is changing between lying and kneeling by itself

NamesetUnitPos "Down" - Unit is lying

NamesetUnitPos "Auto" - Unit decides for itself

In document Arma 3 Editing Guide (Page 138-143)

Related documents