_Tally
Member-
Content Count
7 -
Joined
-
Last visited
-
Medals
Community Reputation
4 NeutralAbout _Tally
-
Rank
Rookie
-
Force AI to Fire Launcher
_Tally replied to Kydoimos's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I got the solution for you here -
Force AI to Fire Launcher
_Tally replied to Kydoimos's topic in ARMA 3 - MISSION EDITING & SCRIPTING
fnc_launcherHandler = { params ["_man"]; private _handler = _man addEventHandler ["FiredMan", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"]; if(_weapon == secondaryWeapon _unit) then{ _unit setVariable ["TALLY_launched", true]; _unit removeEventHandler [_thisEvent, _thisEventHandler]; systemChat "unit fired launcher"; }; }]; _handler; }; fnc_forceLauncherFire = { params["_man", "_wantedDir"]; private _handler = [_man] call fnc_launcherHandler; private _launcher = secondaryWeapon _man; private _mode = (getArray (configFile >> "CfgWeapons" >> _launcher >> "modes"))#0; private _fired = (_man getVariable ["TALLY_launched", false]); private _timer = time +5; waitUntil { if(!isNil "_wantedDir" &&{(round _wantedDir) != (round(getDir _man)) &&{(_timer - time)>= 1}}) then{_man setDir _wantedDir}; _man forceWeaponFire [_launcher, _mode]; _fired = (_man getVariable ["TALLY_launched", false]); ((time > _timer) || _fired); }; sleep 1; if!(_fired)then{_man removeEventHandler ["FiredMan", _handler];}; _man setVariable ["TALLY_launched", nil]; true; }; This one works for me. Basically you got to spam the forceFire-command until he actually completes the action. Then use an eventHandler to kill the loop as soon as the launcher has been fired. Also it is far far from accurate so you might need to plug in some missile-guidance scripts. -
console Advanced Developer Tools
_Tally replied to Leopard20's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Ait. Found it. https://drive.google.com/file/d/1ZIcbDxBmVb6uRP6AZ9FLji7h6PqPmTt-/view ps. I would like to help out / support your work (You've helped me out more then once on the A3 discord). Would you mind if I made a tutorial video for you? -
console Advanced Developer Tools
_Tally replied to Leopard20's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Quick question did you make the tutorial video yet? -
Is it possible to preload textures?
_Tally replied to CapBlackShot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
From my experience its an advantage if the screen has loaded already, its just a couple of seconds anyway.. -
Is it possible to preload textures?
_Tally replied to CapBlackShot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Don't know if they are bigger, the reason why I dont use .paa is because I have a bunch of jpg textures that have an aspect ratio that does not allow for conversion to .paa. And I am too lazy to re-design everything -
_Tally started following Is it possible to preload textures?
-
Is it possible to preload textures?
_Tally replied to CapBlackShot's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So i found a workaround (Not ideal, but it works): Private _OrgText = (GetObjectTextures Player select 0); {Player SetObjectTexture [0, _x]; Sleep 0.05} ForEach _CustomTextures; Player SetObjectTexture [0, _OrgText]; _CustomTextures refers to an array that contains all the custom Textures in the mission. I use this fnc at InitPlayerLocal.sqf And it works like a charm!