dissaifer 10 Posted August 24, 2014 It used to be if you commanded an AI to fire they would aim up and fire, which made it easy to fire flares on command. Now, I am having the trigger go off and the guy is firing the flare at his feet. this is the only command but I have tried a few others, like doTarget at an object in the air, an invisible helipad... even tried a doWatch. test_soldier fire ["GL_3GL_F","GL_3GL_F","UGL_FlareGreen_F"]; Share this post Link to post Share on other sites
buliwyf 4 Posted August 24, 2014 I prefer another solution in my maps... Put this in init line of AI: nul=[this]spawn{if(!isServer)exitWith{}; private ['_unit']; _unit=_this select 0; waitUntil{not isNull (_unit findNearestEnemy position _unit)}; _unit setCombatMode 'RED'; waitUntil{not isNull (assignedTarget _unit)}; _target=assignedTarget _unit; _timeNow=time; waitUntil{(time-_timeNow) >= (3 + random 5)}; nul=[[[_unit, _target, 25, 30], 'flare.sqf'], 'BIS_fnc_execVM', false] spawn BIS_fnc_MP;}; flare.sqf: _source = _this select 0; _target = _this select 1; _hSpeed = _this select 2; _vSpeed = _this select 3; //Fire flare private ["_flarePosition"]; _flarePosition = [] + position _source; _flarePosition set [2, 50]; [_flarePosition, position _target, _hSpeed, _vSpeed] call BIS_fnc_sn_flare; ;) Share this post Link to post Share on other sites
dissaifer 10 Posted August 25, 2014 I have never seen this before and can't find it in game... "[_flarePosition, position _target, _hSpeed, _vSpeed] call BIS_fnc_sn_flare;" Share this post Link to post Share on other sites
buliwyf 4 Posted August 25, 2014 The earth is a sphere! :p That`s not my fault that you didn`t know about that... and i have a surprise.. you will see a lot more things in your life you never saw before... ;) Share this post Link to post Share on other sites
mariodu62 5 Posted August 25, 2014 Yes there is an issue with the fire command. Use forceweaponfire instead of fire command. exemple used in our mission since the command fire is bugged : _unit forceWeaponFire ["SmokeShellMuzzle","SmokeShellMuzzle"]; or _unit forceWeaponFire [currentWeapon _unit, "Single"]; Share this post Link to post Share on other sites
benargee 20 Posted August 25, 2014 The earth is a sphere! :pThat`s not my fault that you didn`t know about that... and i have a surprise.. you will see a lot more things in your life you never saw before... ;) Thats kind of a dick answer. that function isnt even on the BIKI so it must be pretty new. Share this post Link to post Share on other sites
buliwyf 4 Posted August 25, 2014 (edited) I don`t want to disappointing you, but it is in the game since May 2013. The world is more than a BiKi... ;) And i have a surprise.. you will find out a lot more things in your life you will never find in any BiKi... ;) Edited August 26, 2014 by Buliwyf Share this post Link to post Share on other sites
dissaifer 10 Posted August 26, 2014 @Mariodu62 - tried this out... the guy is still firing the flare into the ground. Did use a doWatch or doTarget with that? Share this post Link to post Share on other sites
buliwyf 4 Posted August 26, 2014 Give it a try andd make sure your target is in air by setting your helipad in editor to e.g. 50m: _unit doWatch _target; waitUntil { _dir = direction _unit; _relative = [_unit,_target] call BIS_fnc_relativeDirTo; if (_dir == _relative) exitWith { _unit forceWeaponFire ["GL_3GL_F", "UGL_FlareGreen_F"]; }; false }; Share this post Link to post Share on other sites
dissaifer 10 Posted August 26, 2014 @Buli, tried that and what seems to be every combination from the fireAtTarget, doWatch, doTarget, doFire, commandFire, forceWeaponFire, he always shoots at the ground. Even though there is an invis heli 300m above him. He'll look up there, but just fires at the ground. It's cool, I give up, thanks guys. Share this post Link to post Share on other sites
f2k sel 164 Posted August 26, 2014 The invisible helipad only seems to spawn on the ground the others seem fine, you also need to give it time to target. _unit dotarget _target; sleep 8; _unit fire ["GL_3GL_F","GL_3GL_F","UGL_FlareGreen_F"]; Share this post Link to post Share on other sites
dissaifer 10 Posted August 26, 2014 (edited) @F2k... amazing, it is a combo of the time and the invisible helipad not working. Totally works now, Thanks a bunch. Update: Using InvisibleFence as a dynamic spawn is much better, remember to delete it. Edited August 27, 2014 by Dissaifer Share this post Link to post Share on other sites