MH6
Member-
Content Count
63 -
Joined
-
Last visited
-
Medals
-
The default range of the AI mortars is fairly low I found. While they can hit me from about the distance of half of the airfield (i.e. them at one end and me in the middle), they cannot hit me from one end of the airfield if I am at the opposite end. I have yet to figure out a solution to this, because I know the mortars themselves can fire that distance if you set the range to "far". P.S. - Add this bit of code to determine if the AI are in fact capable of reaching the target location. if(_pos inRangeOfArtillery [[_mortar], "8Rnd_82mm_Mo_shells"]) then { hint "Target in range! Firing..."; } else { hint "Target out of range."; };
-
As 2nd Ranger said, commandArtilleryFire or doArtilleryFire work nicely. I implemented this yesterday using the latter command. On a somewhat related note, I also have a question: Is it possible to tell the AI mortar to switch the ranging mode? If the target position for the artillery barrage lies too far away, they won't fire--but it's only too far away if you are in the first two distance modes (close and medium or some such). If you are in "Far" mode, you can easily reach the target position. But I'm not sure if I can tell the AI to use that option. I can however do it manually if I get in the artillery piece and try to fire it myself. It seems like the AI defaults to Medium range, and refuses to fire at anything that would lay within the "Far" min/max ranges. Though it's possible it's just hard coded somewhere and impossible to change. I thought maybe I had to use a different type of ammunition, but it seems there is only one type of 82mm HE round.
-
RCon server administration coming to ArmA 2!
MH6 replied to $able's topic in ARMA 2 & OA - Servers & Administration
My stuff is currently being beta tested on the Legion of Sparta servers. Once all the kinks have been worked out, and once I can implement $able's fine work, I'll be releasing my apps to the public along with the source. There are two versions, a basic RCON tool where you can execute the usual ArmA admin commands, and an extended tool which adds support for SQL, File IO, HTTP/FTP, and whatever else people write plugins for. -
RCon server administration coming to ArmA 2!
MH6 replied to $able's topic in ARMA 2 & OA - Servers & Administration
:D -
SQL database and Arma 2
MH6 replied to pwnstar23's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
Just a heads up, SpartaLib is now finalized and currently beginning testing over on the Sparta servers. When I am satisfied that SpartaLib is ready for public release I will be releasing the source code for both the RCON Client and the SpartaLib Utility. 545 kb The SpartaLib utility allows the ArmAII dedicated server to contact the outside world via the clipboard, adding quite a bit of functionality to the game, and enabling support of such things as: SQL PHP HTTP/FTP File I/O Remote Admin (RCON) ...plus more to come! Both programs will update themselves should a new version become available, though if you build them from source you can disable this. I've also set it up in such a way as to be fairly easy to extend SpartaLib via plugins, so those that wish to can add their own custom code to ArmA. The Legion of Sparta currently uses this tool for keeping track of certified pilots for each aircraft and for remote admin capabilities. Come visit us on the forums and join us on teamspeak--we're always interested to meet new folks. Oh, and no, Leonidas will not be making an appearance in the public release. :D -
DedicatedServerInterface.sqf is the new UI dialog they added which basically just calls the chat commands (#login/#kick/etc). The chat commands themselves are handled by the engine code I reckon. Certainly can't find any mention of them anywhere else.
-
Deleting member from array
MH6 replied to McArcher's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm not *entirely* sure this works, and I don't currently have the time to test, but I think you can do something like this: _elementToRemove = _i; mcti_airFactories_ru set [_elementToRemove, "_REMOVE_"]; mcti_airFactories_ru = mcti_airFactories_ru - ["_REMOVE_"]; Now I don't know much about the inner workings of these script commands, so not sure if it'd result in a memory leak, but I highly doubt it. Note: You can use anything in replace of "_REMOVE_", such as objNull. -
That means the path is probably wrong. Did you put the script I posed into a file called setupCOIN.sqf in the scripts subfolder of the map?
-
Find nearest Airport
MH6 replied to [frl]myke's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This is what each of those locations looks like in their respective config files: Chernarus: class Local_Airstrip1 { name = $STR_LOCATION_AIRSTRIP; position[] = {4955.75, 2427.69}; type = "NameLocal"; radiusA = 130.83; radiusB = 147.96; angle = 0.0; }; class Local_Airstrip { name = $STR_LOCATION_AIRSTRIP; position[] = {12034.3, 12788.4}; type = "NameLocal"; radiusA = 136.67; radiusB = 154.66; angle = 0.0; }; class Local_Airfield { name = $STR_LOCATION_AIRFIELD; position[] = {4631.52, 10192.2}; type = "NameLocal"; radiusA = 171.47; radiusB = 193.34; angle = 0.0; }; Utes class Utes_CC03 { name = $STR_LOCATION_AIRFIELD; position[] = {3506.23, 3660.34}; type = "CityCenter"; neighbors[] = {"Utes_CC02", "Utes_CC04"}; demography[] = {CIV, 0.0, CIV_RU, 0.0}; radiusA = 10.0; radiusB = 10.0; angle = 0.0; }; So, there's got to be some way to get the positions of every airfield on a map automatically. Especially since they all have the same name, contained in $STR_LOCATION_AIRFIELD. Are you positive the usual location functions won't work? -
attach flare to an object?
MH6 replied to Deathcon5's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Try if(isServer) then { ... }; If that doesn't work, then the script is probably only being executed on clients, and you'll need to change that. -
Here's an example script for adding custom buildings to the Construction Interface. Replace the third element in the array (i.e. 100, or 10) with the price you want that building to be. Then you just call this script from the init field of the COIN module. (i.e. _handle = [this] execVM "scripts\setupCOIN.sqf"; ) _module = _this select 0; //Set the categories //These will be used by each building as well _module setvariable ["BIS_COIN_categories",["Buildings","Defense","Barriers","Sandbag Barriers","Fortifications","Ammunition Crates","Other"]]; //Populate BIS_COIN_items array _module setvariable ["BIS_COIN_items",[ //Format each entry like so: //[Name of Building, Name of Category, Price of Building], ["USMC_WarfareBVehicleServicePoint","Buildings",100], //["USMC_WarfareBAircraftFactory","Buildings",100], //["USMC_WarfareBArtilleryRadar","Buildings",100], ["USMC_WarfareBAntiAirRadar","Buildings",100], ["USMC_WarfareBBarracks","Buildings",100], ["MASH","Buildings",100], //["USMC_WarfareBHeavyFactory","Buildings",100], //["LAV25_HQ_unfolded","Buildings",100], //["USMC_WarfareBLightFactory","Buildings",100], ["USMC_WarfareBUAVterminal","Buildings",100], ["WarfareBAirport","Buildings",100], ["Barrack2","Buildings",100], ["Land_Hangar_2","Buildings",100], ["Land_Antenna","Buildings",100], ["WarfareBCamp","Buildings",100], ["USMC_WarfareBMGNest_M240","Defense",100], ["Stinger_Pod","Defense",100], ["M119","Defense",100], ["M252","Defense",100], ["MK19_TriPod","Defense",100], ["TOW_TriPod","Defense",100], ["M2StaticMG","Defense",100], ["M2HD_mini_TriPod","Defense",100], ["SearchLight_CDF","Defense",100], ["Base_WarfareBBarrier10xTall","Barriers",100], ["Base_WarfareBBarrier10x","Barriers",100], ["Base_WarfareBBarrier5x","Barriers",100], ["Land_HBarrier5","Barriers",100], ["Land_Hbarrier_large","Barriers",100], ["Land_HBarrier3","Barriers",100], ["Land_HBarrier1","Barriers",100], ["Hedgehog","Barriers",100], ["Fort_RazorWire","Barriers",100], ["Land_BarGate2","Barriers",100], ["Land_ConcreteBlock","Barriers",100], ["Land_CncBlock","Barriers",100], ["Land_BagFenceLong","Sandbag Barriers",100], ["Land_BagFenceShort","Sandbag Barriers",100], ["Land_BagFenceCorner","Sandbag Barriers",100], ["Land_BagFenceRound","Sandbag Barriers",100], ["Land_BagFenceEnd","Sandbag Barriers",100], ["Land_fort_bagfence_long","Sandbag Barriers",100], ["Land_fort_bagfence_corner","Sandbag Barriers",100], ["Land_fort_bagfence_round","Sandbag Barriers",100], ["Land_fortified_nest_big","Fortifications",100], ["Land_fortified_nest_small","Fortifications",100], ["Land_Fort_Watchtower","Fortifications",100], ["Land_fort_rampart","Fortifications",100], ["Land_fort_artillery_nest","Fortifications",100], ["USBasicAmmunitionBox","Ammunition Crates",10], ["USLaunchersBox","Ammunition Crates",10], ["USOrdnanceBox","Ammunition Crates",10], ["USBasicWeaponsBox","Ammunition Crates",10], ["USSpecialWeaponsBox","Ammunition Crates",10], ["USVehicleBox","Ammunition Crates",10], ["FlagCarrierUSA","Other",10], ["HeliHRescue","Other",10], ["HeliHCivil","Other",10], ["HeliH","Other",10], ["Land_CamoNet_NATO","Other",10], ["Land_CamoNetVar_NATO","Other",10], ["Land_CamoNetB_NATO","Other",10], ["Camp","Other",10], ["Land_Toilet","Other",10], ["Fence_corrugated_plate","Other",10] ]]; //End BIS_COIN_items Array Hopefully the comments in the script are enough for you to go by?
-
Not sure about that bud. Maybe try just giving the truck the Build action and ignore _BIS_COIN_idAction completely, and see if that works. If it does, great. If it doesn't, then you need some way to get the player who is using the truck. I assume you want them to be able to build while outside the truck too, yes?
-
x_consmod and COIN_RU_MHQ are variables, but yes, you can replace x_consmod with COIN_RU_MHQ, and your code will work.
-
Small SQF causing weird De-sync.
MH6 replied to Jat Goodwin's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Essentially, though you can use smaller values, i.e. sleep 0.25 to sleep 1/4th of a second. P.S.- You the same Jat from Wiremod? :D -
You need to do something similar to the following whenever the player you want to give the ability to build to spawns. When they spawn (which you can determine with the use of an event handler if you haven't set something up already), you have to add a custom Build action to their action menu, like so: _action = player addAction ["Build","scripts\coin\coin_interface.sqf",x_consmod,1,false]; player setvariable [_BIS_COIN_idAction,_action]; Where x_consmod is the name of the Construction Module you placed in the map (if it doesn't have a name, give it one). The module may also need to be synced with the player in the map editor. Also, if you want the player to be able to build anywhere, instead of only where you place the Construction Module, add this below where you add the action: [x_consmod,player] execVM "scripts\coin\updateConstructionModule.sqf"; and stick this into "scripts\coin\updateConstructionModule.sqf", which you'll need to create. _module = _this select 0; _cmdr = _this select 1; _module setvariable ["CMDR",_cmdr,true]; while {true} do { if(!alive _cmdr) exitWith{}; _pos = getPos _module; _module setPos getPos _cmdr; sleep 5; }; All this does is reset the position of the module to the player's position, so he'll always be able to build where he is at. It keeps the radius restriction though, so he can't build something a mile away from his location. Now just stick coin_interface.sqf from my above post into scripts/coin/ and you should be set. That should be all you need for it to work. If it doesn't, let me know; I may be forgetting something (haven't used these scripts in a while).