HX3 Foren

HX3 Foren (https://hx3.de/)
-   Editing & Scripting (https://hx3.de/editing-scripting-187/)
-   -   Arma 3 Animations Loop (https://hx3.de/editing-scripting-187/arma-3-animations-loop-23255/)

Tantrael 02.01.2014 01:15

Arma 3 Animations Loop
 
Hallo Community,

ich hätte gerne für eine Soldaten eine Loop Animation, kennt sich da jemand aus?

Ich habe hier einen Soldaten (A2) der soll die Animation "Acts_A_M04_briefing" ausführen. Ich habe dafür schon einen Trigger aufgestellt der auf "Repeatedly" gestellt ist und in der ON ACT.: steht

Zitat:

A2 switchmove "Acts_A_M04_briefing"; A2 disableAI "ANIM";
Die Animation funktioniert, allerdings weiß ich nicht wie ein Repeat funktioniert. Ich habe schon in den BIForen gesucht allerdings waren dort nur Threads für Arma 2 Animationen mit dem gleichem Problem.

Schon mal danke im voraus.

Drunken Officer 02.01.2014 07:22

Ich GLAUBE, diese Animation hat keinen automatischen loop.

Also, eine Schleife bauen

while {alive hampelmann} do {....; sleep xx};
wo xx steht setzt du die Zeit ein. Die genaue Animationsdauer kannst du dir in der Vorschau holen. Die steht links unten.

Falls es nicht unbedingt diese Animation sein muss, verliere mal das nicht aus den Augen
Code:

/*    Author: Jiri Wainar
Description:    Play set of ambient animations on given unit. 
Remarks:   
* Can handle several different anims and auto-switching between them.    * Detects nearby units with the same animation set and tries to select different animations. 
* A game logic is created on units position and animated unit is then attached to it, to prevent possible problems, like player pushing units around. 
* The unit can be snapped to a set snappoint to prevent game from repositioning the unit.
* The snappoint is automatically detected, snap distance is 2 meters (in top-down view, ignoring vertical info).        * To position unit vertically, move its snappoint up/down.        * A snappoint is a (cyan colored) helper "Sign_Pointer_Cyan_F".        * This is extremely handy if the unit needs to be placed near object(s) - like on chair near a table.      Parameter(s): 
0: OBJECT - unit the anim & gear changes are going to be applied to
1: STRING - animation set id, describing what the unit's action looks like.    > "STAND"        - standing still, slightly turning to the sides. Needs a rifle! > "WATCH"        - standing and turning around, good for soldier on watch. Needs a rifle!
> "GUARD"        - standing still, like on guard with hands behing the body. > "LISTEN_BRIEFING"  - standing still, hands behind back, recieving briefing / commands, no rifle.
> "SIT"        - sitting on chair or bench. Needs a rifle!
> "SIT_HIGH"    - sitting on taller objects like a table or wall, legs not touching the ground. Needs a rifle!
> "SIT_LOW"        - sitting on the ground, with weapon.
> "SIT_LOW_NOWPN"    - sitting on the ground, without weapon.
> "SIT_SAD1"        - sitting on a chair, head down, looking very sad.
> "SIT_SAD2"        - sitting on a chair, staring towards, looking very sad.  > "KNEEL"        - kneeling, with weapon.
> "KNEEL_MEDIC"    - kneeling while treating the wounded.
> "PRONE_INJURED_NOWPN"    - laying wounded, back on the ground.      > "PRONE_INJURED"    - laying wounded & still, back on the ground, no weapon.
> "LEAN_ON_TABLE"    - standing while leaning on the table
> "LEAN"        - standing while leaning (on wall)
> "REPAIR_VEH_PRONE"    - repairing vehicle while laying on the ground (under the vehicle)
> "REPAIR_VEH_KNEEL"    - repairing vehicle while kneeling (like changing a wheel)
 > "REPAIR_VEH_STAND"    - repairing/cleaning a vehicle while standing     

2: STRING - equipment level id, describing how heavily is the unit equipped.
 > "NONE"          - no goggles, headgear, vest, weapon
> "LIGHT"          - no goggles, headgear, vest
> "MEDIUM"        - no goggles, headgear
> "FULL"          - full gear = no touches
> "RANDOM" (default)    - gear is randomized according to the animation set     
 Returns:    -     
 Example:    [this,"PATROL"] call BIS_fnc_ambientAnim;
 */


KimmeUKorn 06.01.2014 19:26

Nabend,
wenns recht ist klinke ich mich hier Abhilfe erhoffend ein.
Ich bin durch die vergangenen Posts über Animationen hier im Forum auch mit Solchen am rumtüdeln.
...So als Einstieg in diese Materie ist der Code von Drunken ja schon recht nice, so wie auch der hilfreiche Guide von MR Murray, und die Funktion im Editor :daumen:
....dennoch wollte ich mal fragen wie das mit der Schleife in diesen Beispielen genau fuktioniert?
bzw. wie das dann genau geschrieben werden muss, um es über einen Trigger ausführen zu können?

ohne Schleife: (kein Problem)
Code:

A2 switchmove "Acts_A_M04_briefing"; A2 disableAI "ANIM";
mit Schleife, und ner Animationszeit als Beispiel von 2.33sek.: (mit Problem )
Code:

while {alive A2} do {Acts_A_M04_briefing"; A2 disableAI "ANIM"; sleep 2.33};
Also bei mir wird die Animation nach einem kurzem Stand des Bildes einmalig ausgeführt :(

Drunken du hattest ja erwähnt, das Du schon mit Animationen gearbeitet hast, wie ist das denn, wenn man ne Anzahl von Animationen hintereinander folgend ausführen möchte?

Im Guide steht passend zum Thema:
Zitat:

Des Weiteren dauert jede Animation eine gewisse
Zeit. Diese sollte man berücksichtigen, wenn die Einheit danach eine weitere Animation
ausführen soll. Dazu setzt man einfach einen Delay (z.B.: ~10) zwischen die Befehlszeilen
in seinem Skript.

Drunken Officer 07.01.2014 10:25

In deiner Schleife wir gefragt ob a2 am leben ist, nich aber wer die Animation ausführen soll.

Die Codezeile mit ~ Delay ist ein sqs code. Im Sqf nimm sleep.

Ob du die Peron im Trigger oder aus einem Script heraus ansprichst, ist eigentlich Wurst. Es muss halt der Namen stimmen, damit Arma weiß, wer es ausführen soll.

Wenn mein neues Mainbord da ist, (das andere ist im PC Himmel, und hoffentlich ist es nur das MB und nicht auch noch der CPU) werde ich mich mal ranmachen.
Teilweise ist es verwirrend. Einige Animationen benötigen ein (spawn) script andere kannst du direkt in die Init kloppen.
Oftmals kommst du mit probieren auf die Lösung.

Die ganzen Animationsbefehle findest du im Wiki. Oder du öffnest mal eine Mission, die soetwas verbaut haben und schaust nach. Da kann man sowieso am besten lernen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:56 Uhr.

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119