Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

fatty86

Member
  • Content Count

    202
  • Joined

  • Last visited

  • Medals

Everything posted by fatty86

  1. Wrote this short little script to add ambience to missions involving large artillery pieces like cannons, rocket artillery, mortars, etc. Presumably would work with just about anything - I can confirm it works with Shilkas, for instance. Basically, an object run with this script will fire at regular intervals at a target until the gunner is dead or runs out of ammo. Confirmed dedicated server safe. SQF File Demo Mission /* fatty's ambient artillery tool (faat) version 1.0 by fatty Forces an AI gun (e.g. cannon or rocket artillery) to fire at regular intervals at a defined target. Gunners will persist until out of ammo or dead. CAUTION: the guns fire live ammo, so be careful where you aim! Required Parameters: Artillery Piece (object) - object to begin firing. Target (object) - target at which the artillery piece will fire. Suggested target is an invisible H setPos'd several hundred metres above the gun. Optional Parameters: Delay (number) - delay between shots in seconds (default is 10 seconds). Disable aiming AI (boolean) - prevents AI gunners from engaging other targets (default is true). Enable auto-rearm (boolean) - enables automatic rearming of gun after every shot (default is false). Examples: nul = [big_gun, gun_target] execVM "faat.sqf"; nul = [rocket_artillery, house, 20, false, true] execVM "faat.sqf"; */ private ["_gun","_target","_delay","_disableaim","_autorearm"]; _gun = _this select 0; _target = _this select 1; _delay = if (count _this > 2) then {_this select 2} else {10}; _disableaim = if (count _this > 3) then {_this select 3} else {true}; _autorearm = if (count _this > 4) then {_this select 4} else {false}; if (_disableaim) then { {_gun disableAI "_x";} foreach [move,target,autotarget,anim]; _gun setCombatMode "BLUE"; }; (gunner _gun) lookAt _target; While {alive (gunner _gun)} do { sleep _delay; _gun fire (weapons _gun select 0); if (_autorearm) then { _gun setVehicleAmmo 1 }; };
  2. I'm trying to set up a trigger to fire when all BLUFOR units are within the trigger area. Here's what I've got: Trigger BLUFOR PRESENT, condition: ((count thisList) == ({alive _x && side _x == west} count allUnits)) The trouble I'm having is this. It appears count thisList is counting all units in a BLUFOR helicopter as one single unit. So, say I have 10 guys on the ground, and 3 in a helicopter. It's treating the three helicopter guys as one unit, so 10+1=11. However, the count allUnits is returning EVERY BLUFOR man still alive, which is the full 13. The difference is that count allUnits treats each guy - including those in the helicopter - as an individual unit. How do I get the two to see 'eye to eye' and count each unit the same?
  3. Hi, I've had good luck simulating tight ROE using a combination of ALICE and the event handler 'killed' like this: alice_module setvariable ["ALICE_civilianinit", [{ _this addeventhandler ["killed",{ if (side (_this select 1) == west) then { civ_casualties = civ_casualties + 1; publicvariable "civ_casualties" } } ]}]] call bis_fnc_variablespaceadd; Occasionally I have a mission where I want a team to destroy an objective in a populated area. Invariably, using satchels kills nearby civilians and trips the civ_casualties trigger. So I want to modify this to check if the weapon that killed the civilian was a satchel charge. As far as I can tell, though, event handler 'killed' only passes the killer and the killed. I suppose one method would be to use 'handleDamage' instead of 'killed', pull the projectile from that array,and throw in a check to see if the unit was still alive. I'm just wondering if anyone else has experience with this and maybe has any ideas that could help. Thanks!
  4. I'm looking for a command that returns a unit's stance/posture. unitPos comes close, but according to biki: "the return value is always "Auto" unless the unit has gotten a setUnitPos command." Since I want to poll a player's stance, this isn't going to help me, I don't think. The idea is to script some pressure-activated IEDs that blow if a unit is moving in anything besides a crawl. Thanks!
  5. Hi guys, Let me first explain what I am trying to do. I want a multiplayer mission to scale difficulty based on what assets are occupied by human players. I have a group of playables in Charlie team, each with the following code in their init fields: c_grp = group this; c_grp setGroupId ["Charlie"]; In init.sqf, I have this: if (({isPlayer _x} count units c_grp) = 0) then { {deleteVehicle _x} forEach units group infreinf1; {deleteVehicle _x} forEach units group infreinf2; {deleteVehicle _x} forEach units group infreinf3; {deleteVehicle _x} forEach units group infreinf4; }; This works perfectly if the game is run with no players occupying those slots - the units are deleted as desired. It also works terrific if a player is in the group - the extra groups stay and the team encounters some extra resistance. The problem I am encountering, is that if the admin DISABLES the AI in those slots, the script will error out as "c_grp" is not an existing group, and the reinforcing units are not deleted. So, I tried a different approach: if any players are detected in the group, do nothing. Else, the default behaviour will be to delete the reinforcing units. if (({isPlayer _x} count units c_grp) >= 1) then {} else { {deleteVehicle _x} forEach units group infreinf1; {deleteVehicle _x} forEach units group infreinf2; {deleteVehicle _x} forEach units group infreinf3; {deleteVehicle _x} forEach units group infreinf4; }; Same result with the error. Any thoughts on how I can get this 'if' check to work even if the AI units are disabled and "c_grp" doesn't exist?
  6. http://forums.bistudio.com/showthread.php?t=113211
  7. I'd settle for any other way to get the trigger to fire when all units of a given side are within its area.
  8. Try experimenting with ppEffects. You might be able to set up a nice infrared view for the zombie players.
  9. Tasks are not completing properly because you used quote marks in the Mission diary, accidentally ending the string prematurely and breaking the rest of the script. Use double quote marks to embed a quote mark and have it show in your notes. Like this: player createDiaryRecord["Diary", ["Mission", "Your mission is to destroy the 3 AA sites <marker name = 'mkrTask1'>here</marker>, <marker name = 'mkrTask2'>here</marker> and <marker name = 'mkrTask3'>AA_site_1_1</marker>. Then destroy the AA radar <marker name = 'mkrTask4'>here</marker>, they can be blown up in any order. Expect at least 3 UAZs carrying MGs, about 40-50 infantry and MG nests (positions show in Intel) <br/> Each fire team has a medic. Bravo has 2 royal engineers with the satchels. We have also ""borrowed"" a SMAW from the yanks and given it to alpha. We have also raided the rest of the battlion for LSWs for this mission."]]; More info here: http://community.bistudio.com/wiki/Scripting_Grammar#Strings Also, a few of the variable names in there need to be updated. Check out under tasks 3 and 4 - you have objTask2 for task 2, and objTask3 for task 4. You already updated the other variables... just change those two to objTask3 and objTask4 (respectively) and you should be good.
  10. fatty86

    Add radar for BTR-90 gunner/driver

    Lots of interesting changes, unfortunately I don't see anything regarding azimution indicators.
  11. Currently, most if not all OPFOR vehicles from both ArmA2 and OA have a radar display for the commander, the gunner, and the driver. In the Russian BTR-90, the commander has a radar, but the driver and gunner do not. Please add a radar for the driver and gunner. Even if it doesn't display enemy units, I'd like to be able to see turret and commander azimuth relative to the course of the vehicle.
  12. fatty86

    Add radar for BTR-90 gunner/driver

    Yeah, looks like the LAV-25 driver/gunner is missing it too. Other wheeled vehicles like the BRDM and the Strykers seem okay, probably because the gunner and commander are the same person. So far these vehicles/crew positions do not have radar: BTR-90: driver/gunner BTR-60: gunner LAV-25: driver/gunner
  13. I don't think you can just addMagazine an entire group. I believe you need to specify a single object/character to receive the magazine. Try running a short loop like this instead: {_x addmagazine _magazine} foreach units group player; Edit: gah, beaten by mere seconds
  14. Exactly what you are looking for: http://forums.bistudio.com/showthread.php?t=113211
  15. It means yesterday. I have to say I'm not really interested in this game at all, but I'll probably pick it up to support BIS.
  16. Sounds to me like BIS is opening a branch office in Seattle.
  17. fatty86

    AA Fire into air

    http://forums.bistudio.com/showthread.php?t=113211
  18. I have a mission where I want the players to destroy a downed helicopter before it falls into enemy hands. I'd like to prevent players from being penalized for destroying friendly equipment, so that the friendly AI doesn't end up killing them. I've tried setting the vehicle's side from EMPTY to EAST in the mission.sqm, but I noticed when testing last night that the player who destroyed the helo still ended up with -1 air kills in the final score. Any known workarounds for this?
  19. Just a guess, try this: while {true} do { sleep 1; skipTime -0.00026; };
  20. Interesting idea. Applied to the empty helicopter, I assume?
  21. Scripts executed via addAction run locally for whoever executed the action. Since addAction is a local command, the action is only removed for whoever executes the action. The script doesn't run for anyone else, so no one else has the action removed. One workaround I use for this is to have the script executed by the addAction simply set a variable to true and make it public with publicVariable - nothing else. A trigger waits for that variable and then executes the 'real' script. This ensures the effects of the action are completely global. Now, since some of the commands executed in the 'real' script will have global implications (e.g. createVehicle or whatever), then it's best to just put those commands behind an isServer check.
  22. You're referencing an array where an object is needed. Change... clearMagazineCargo _this; clearWeaponCargo _this; ...to... clearMagazineCargo _crate; clearWeaponCargo _crate; Running your game with -showscripterrors will point out these issues for you. Still, that won't fill the boat for you. Odd - no ships of any kind are listed in Kylania's cargo capacity spreadsheet (http://www.kylania.com/ex/?p=105). It may be possible that the boats have zero capacity, in which case nothing will fit in them. You might be able to fake it by using attachTo with an ammo crate or something.
  23. Yes, use handleDamage, like this: this addeventhandler ["handleDamage",{ if ((_this select 4) == "PipeBomb") then { hint "The pipebombs, they do nothing!."; } else {_this select 2}; }];
×