Ja es ist Älter sitze aber auch grade drane xD
An sich schöne Idee, aber leider Performancelastig
Naja genau wenn man es mit einer schleife macht schon ![]()
Mag sein, dass das Cool ist, aber zieht wie gesagt höllisch [lexicon]Performance[/lexicon] wenn das nicht nur 3-4 NPC's machen (Bei Exile gibt's das ja an den Fahrzeugshops, aber davon gibts da ja nicht viele)
Ja mhh Exile die jung sind aber nicht dumm
also einfach mal geguckt wie die das so machen und HAHA keine Schleife
hier jetzt meine Version
Erstellt 2 Neue Dateien im Ordner core/functions
fn_animations.sqf und fn_onAnimationDone.sqf
In die fn_animations.sqf kommt
/*
Author: br1zey/Ryu
Description:
Animate NPC and give more Realistcs
[this] call life_fnc_animations;
*/
private["_npc","_animations","_logic","_dir","_pos","_attachToObject"];
params [
["_npc",ObjNull,[ObjNull]]
];
_animations = ["HubBriefing_scratch", "HubBriefing_stretch", "HubBriefing_think", "HubBriefing_lookAround1", "HubBriefing_lookAround2"];
_npc enableSimulation true;
_npc setVariable ["BIS_fnc_animalBehaviour_disable", true];
_npc setVariable ["RL_Animations", _animations];
_npc disableAI "ALL";
_npc allowDamage false;
_npc removeAllEventHandlers "HandleDamage";
_npc switchMove (_animations select 0);
_npc addEventHandler ["AnimDone", {_this call life_fnc_onAnimationDone}];
Alles anzeigen
und in die fn_onAnimationDone.sqf kommt
private["_npc","_animations"];
_npc = _this select 0;
_animations = _npc getVariable ["RL_Animations", []];
_npc switchMove (_animations select floor(random (count _animations)));
true
Jetzt müsst ihr die beiden Natürlich noch in der Functions.hpp eintragen
also in der class Functions unter
class tazeSound {};
einfach
class animations {};
class onAnimationDone {};
Eintragen
Zu Guter Letzt nur noch in die Init vom NPC
[this] call life_fnc_animations;