Search the Community
Showing results for tags 'dotarget'.
Found 3 results
-
i have this Script that i put in a trigger or the Unit INIT field shotter dotarget t1; sleep 3; while {alive t1 and alive shotter } do {sleep 0.3; shots = shots +1; gl action ["useweapon",vehicle shotter,shotter,0]}; and i have found this script also shotter addeventhandler ["fired", {(this select 0) setvehicleammo 1}]; }; it gives the SHOTTER unlimited ammo if put inside the script above like this : shotter dotarget t1; sleep 3; while {alive t1 and alive shotter } do {sleep 0.3; shots = shots +1; gl action ["useweapon",vehicle shotter,shotter,0]; shotter addeventhandler ["fired", {(this select 0) setvehicleammo 1}]; }; But what i need is the SHOTTER to make a magasin change when a amount of shots is fired. the character is the Heavy gunner vanilia with a 130 round magasin on weapon. if i leave the unlimited line out of the script he makes his MAG change but he runs out of ammo after 3 MAG changes and stop to fire. how do i make him get 3 new magasins when he is empty ?? Cherrs
- 18 replies
-
A few months ago I had a script that would have a group of AI units fire into an area using a logic as their target, that then changed it's position for each new firer, so that every time a unit fired it would be at a different position within a given area. This used to work, but now I'm trying to use it again without success, as the AI will target and fire at the logic's original position, but no longer target it once it has changed position. The below code is part of what loops through each unit at a set interval while the script is still running. _logic setPos [(_xPos - _areaSizeX) + (random (_areaSizeX*2)),(_yPos - _areaSizeY) + (random (_areaSizeY*2)),_zPos]; sleep 0.1; _unit doWatch objNull; _unit reveal [_logic,4]; _unit doWatch _logic; _unit doTarget _logic; Then, once other variables have been set (like weapon/muzzle to fire, number of rounds to fire), the AI fire. This part still works: while {(_ammo > _endBurst)} do { _logic action ["UseWeapon",vehicle _unit,_unit,_index]; _ammo = _unit ammo _weapon; sleep 0.05; }; So, they end up firing as per normal, but they don't aim at the logic when it changes position (the logic DOES change position correctly). They continue to realign to the logic's original position. Any ideas why?
-
Hello. Is it possible for non leaders (players) to mark targets for the whole squad? Can there be multiple marked targets/Red Boxes at the same time marked by members (players) of the squad? Here's a script I came across. Currently it works for each player on their own machine - where they each designate a target and can track it. How can I make changes to allow all squad members (players) to mark targets that are visible to all members (players) - Multiple Targets Simultaneously If Possible. targeter = _this select 0; my_target = cursorTarget; my_targetdis = targeter distance my_target; my_targetdis = round (my_targetdis); my_targetdir = getdir targeter; my_targetdir = round (my_targetdir); mrktarget = { { _x doTarget cursorTarget; } forEach units group targeter; }; my_msg = { //targeter groupChat format["Fire at this target! %1 m %2 deg from me", my_targetdis, my_targetdir]; targeter groupChat format["Target - %1 m - Bearing %2 - From my position", my_targetdis, my_targetdir]; }; [[targeter],"mrktarget",true,false] spawn BIS_fnc_MP; [[targeter, my_targetdis, my_targetdir],"my_msg",true,false] spawn BIS_fnc_MP;