merlin
Member-
Content Count
122 -
Joined
-
Last visited
-
Medals
Everything posted by merlin
-
Well i've run into another hurdle, this one more straightforward. I'd like to identify specific named entities for some vehicles so rather than every vehicle of a type registering i only want one, in this case the tank named "kuma1". My assumption is that cursortarget passes the entity's name, either i've made a mistake or this is not the case. Is there a command that would function like: (nameof cursortarget == kuma1) (i've looked and i've found nothing of the sort) _ctarg = cursortarget; //CURSOR ENTITY _campos = screenToWorld [0.5,0.5]; //SCREEN POSIT _cvtarg = typeof cursortarget; //TYPE OF VEHICLE if (_ctarg isKindOf "landvehicle") then { hint str typeof cursortarget; if (_cvtarg == "O_MBT_02_arty_F") exitWith {arty1 setdamage 1}; if (_cvtarg == "O_MRAP_02_F") exitWith {mrap1 setdamage 1}; if (_ctarg == "kuma1") exitWith {kuma1 setdamage 1}; .... };
-
hint format doesn't seem to work :( I've tried each of the lines individually and they all do what i want, that is to say i can identify what type of vehicle the player is looking at. my problem is in combing them together in a tree, (i believe nesting is the term for this). Once i put an IF THEN statement inside another the whole script seems to fail. I made a flowchart to illustrate what i'm trying to do. whenever i try to implement the checks in the red circle the script does not supply me with any hints. Edit: lol, sorry to have put you guys through this. it works great now, thanks for your patience Iceman!
-
Maybe this better defines my problem. This does what i'd like, when i point at a howitzer and run the script it blows up, when i'm not pointing at ti and i run the script i get the coords. private ["_ctarg","_cvtarg","_campos"]; _ctarg = cursortarget; //CURSOR ENTITY _campos = screenToWorld [0.5,0.5]; //SCREEN POSIT _cvtarg = typeof cursortarget; //TYPE OF VEHICLE if (_cvtarg == "O_MBT_02_arty_F") then {arty1 setdamage 1} else { hint format["Posit %1",_campos]; }; I'd like the script to check if i'm looking at a vehicle, then proceed to interrogate it to find out what kind, and update objectives accordingly, otherwise it would check the coords. I would think nesting the specific vehicle IF THEN check (in this case just a howitzer) like this would work but i don't get any hint when i run the script. if (_ctarg isKindOf "landvehicle") then //check if looking at a vehicle { hint str typeof cursortarget //just for debug if (_cvtarg == "O_MBT_02_arty_F") then {arty1 setdamage 1}; //if the vehicle is a howitzer blow up the objective if (_cvtarg == "some MRAP classname") then {mrap1 setdamage 1}; //if the vehicle is an MRAP blow it up } else { hint format["Posit %1",_campos]; }; For this i believe i would use exitwith, but upon testing i still get no hint.
-
I really appreciate the fast response, if I understand correctly I would just replace the red "vehicleClass"with the classname of say a howitzer that i want the player to spot and it should work? Is this correct? [color="#696969"]private ["_ctarg","_cvtarg","_campos"]; _ctarg = cursortarget; //CURSOR ENTITY _campos = screenToWorld [0.5,0.5]; //SCREEN POSIT _cvtarg = typeof cursortarget; //TYPE OF VEHICLE private ["_ctarg","_cvtarg","_campos"]; [/color] if (_ctarg isKindOf "landvehicle") then { _vehTypeArray = ["Armored", "Air", "Car"]; if ( !isNull cursorTarget && {getText (configFile >> "cfgVehicles" >> typeOf cursorTarget >>[color="#FF0000"] "O_MBT_02_arty_F"[/color]) in _vehTypeArray} ) then { hint format ["I spot the %1 and now i will destroy the mission objective!!!", typeOf cursorTarget]; arty1 setdamage 1; }; // [color="#008000"]i'd like to have 5 or 6 of these for different types of vehicles to spot, each one completing a mission objective.[/color] if ( !isNull cursorTarget && {getText (configFile >> "cfgVehicles" >> typeOf cursorTarget >>[color="#FF0000"] "Some other vehicle class..."[/color]) in _vehTypeArray} ) then { hint format ["I spot the %1 and now i will destroy the mission objective!!!", typeOf cursorTarget]; othervehicle1 setdamage 1; }; [color="#696969"] } else { hint format["Posit %1",_campos]; };[/color]
-
A Large Fixed Wing transport aircraft for Arma 3
merlin replied to progamer's topic in ARMA 3 - GENERAL
RORO ships and landing crafts are far more capable and cost effective for bringing in heavy equipment, furthermore a C-17 would have at most a two minute flight to anywhere on Altis, it's an absolute mockery to use such an asset for a task as trivial as that. As for bringing equipment to the island i agree it has a role in the story but no application in gameplay as the island exists in a vacuum. From a development standpoint small to medium sized aircraft like the AN-2 and the C-23 would have a greater payoff as they are designed for short ferry flights, infiltration, and small supply drops (like those weapon pallets that function as ammoboxes in game now). Those three functions fit very well into what i imagine the ArmA 3 story is, as ferry flights would be used to move resistance members around the island or to insert them into a hostile part of the island, there are great mission possibilities such as "assassinate general Guba before he takes his charter flight on a Cessna out of the island!" and so forth. -
A Large Fixed Wing transport aircraft for Arma 3
merlin replied to progamer's topic in ARMA 3 - GENERAL
A large fix winged transport aircraft would be very unsuitable for ArmA 3, except perhaps as a static object to be destroyed as a mission objective. Smaller transport aircraft such as the AN-2 (provided it's still flying in the A3 timeline) would be greatly suited to the Altis terrain, perhaps being used by rebels to smuggle men, equipment or even narcotics into the island undetected. A seaplane would also be very resourceful. If i had to suggest such an aircraft it would be the C-23 Sherpa http://en.wikipedia.org/wiki/Short_C-23_Sherpa It would be ideal for supply drops of fuel/equipment to remote installations without the hassle of being too large and cumbersome. I love large transport aircraft; the C-17 in particular, but they really don't fit the theme of ArmA 3. -
This appears to be what you speak of. It may be beyond the scope of what you plan on adding but perhaps you should inquire with Dslyecxi about his littlebird enhancement addon and whether you can enable the co-pilot to shoot out of the door with a rifle, that prospect is ...arousing.
-
isNull problem , check if unit exists and update array
merlin replied to wiggum2's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
This is how i integrated your script, however I must be missing something as no hints appear. Should the variable spy be _spy? I'm not quite sure if the underscore for a variable has a function or is just a habit among scripting folk. Also my intent is to only call this script once with the init, does the while condition mean it will be constantly updated? Ideally i'd only need it to detect which of the eight units exist (AI would be disabled) and pick one at random. I appreciate the quick response though and will keep trying to sort this out. spy.sqf _playable_units = [a1,a2,a3,a4,a5,a6,a7,a8]; _i = (count _playable_units) - 1; while {_i > -1} do { _unit = _playable_units select _i; if (not isPlayer _unit) then {_playable_units = _playable_units - [_unit]}; _i = _i - 1 }; // here the _playable_units array should contain only those units being filled by human players _playable_units call BIS_fnc_selectRandom = spy; publicVariable "spy"; hint format["%1 is the spy", spy] -
isNull problem , check if unit exists and update array
merlin replied to wiggum2's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
I apologize for necromancing this thread, but as far as I can tell this is relavent. What I want is a system to pick a random unit from a3-a8 as a spy, then tell that player they are the spy. As you can imagine the problem occurs when not all of the slots are filled and a phantom player is assigned as the spy. My attempt was to subtract all of the players that entered the game (in trigger trig1, located over the starting position) from the list of all available slots, which would return all of the slots that did not exist, I would then subtract that from the first array. spy.sqf _array1 = [a3,a4,a5,a6,a7,a8] _array2 = list trig1 _array3 = _array1 - _array2 _array4 = _array1 - _array3 spy = _array4 call BIS_fnc_selectRandom; publicVariable "spy"; //spy = [a3,a4,a5,a6,a7,a8] call BIS_fnc_selectRandom; // first attempt, does not account for missing players hint format["%1 is the spy",spy] sleep 5; If (name player == spy){ hint format["You are the spy, %1", spy]; }; // notifying spy of his profession 1) Is this a valid approach to my problem, or should I try what was covered in this thread? (what I see seems to be well beyond my scripting abilities) 2) Did I use publicvariable correctly? will the same person be assigned as the spy in a mp match? (spy.sqf is called from the init) 3) For the hints is there a way to list the player's profile name, rather than the unit's name? This would be for a hint at the end of the game, i imagine it would look something like hint format["%1 was the spy",spy select 2] although i don't know the syntax. Thanks! -
Really impressive set of scripts there, something like this is dearly needed for COIN missions. Is it possible to load these captives into transports? I imagine that would make for some really snazzy snatch missions. Looking forward to release!
-
Apologies in advance if this is a very rudimentary question. I'm trying to randomize the contents of some weapons caches. What i want is a random quantity of one, or in some cases several different weapons. I'm quite amateurish at scripting and this was my first attempt. while {alive _this} do { clearweaponcargo _this; clearmagazinecargo _this; _rNumber = random 10 _this addWeaponCargo ["ACE_M72",_rNumber;]; sleep 8800; }; my second attempt looked like this _this addWeaponCargo ["ACE_M72", %1, _rNumber;]; My question is 1. What am I doing wrong? 2. (Assuming this would be done though the addition of variables) Is there an efficient way to set individual random numbers for a decent amount of weapon/ammo types? Thanks very much!
-
Sorry to bump this thread once more but i've encountered something of a multiplayer problem. When running a local server only the host can see the randomized loadout and take weapons from the crate. Dedicated servers on the other hand seem to produce different loadouts for each player and will not let anyone take weapons from the crate. I presume this is because the random number generation that i had in the ammo1.sqf was run by the individual clients. I assumed i could fix this by making the random number a public variable. this resulted in nothing happening in mission editor tests, I have yet to test it on a dedicated server but i feel like i'll get the same result (unless publicvariables do not work in SP missions). init.sqf num1 = {floor (random 10)} publicVariable "num1"; init line of weapon crate nul = [this] execVM "ammo1.sqf"; ammo1.sqf _ammobox = _this select 0; clearweaponcargo _ammobox; clearmagazinecargo _ammobox; switch (num1)) do { case 0: { _ammobox addWeaponCargo ["Binocular",2]; _ammobox addWeaponCargo ["ACE_RPG22",1]; _ammobox addWeaponCargo ["Sa61_EP1",1]; _ammobox addMagazineCargo ["10Rnd_B_765x17_Ball",8]; _ammobox addMagazineCargo ["PMC_ied_v4",1]; _ammobox addMagazineCargo ["ACE_MON50_M",2]; _ammobox addMagazineCargo ["HandGrenade_Stone",30]; }; case 1: { _ammobox addWeaponCargo ["ACE_Javelin_CLU",1]; _ammobox addWeaponCargo ["ACE_Javelin_Direct",2]; _ammobox addWeaponCargo ["UZI_EP1",3]; _ammobox addWeaponCargo ["glock17_EP1",1]; _ammobox addMagazineCargo ["ACE_30Rnd_9x19_S_UZI",20]; _ammobox addMagazineCargo ["ACE_33Rnd_9x19_G18",10]; }; case 2: { _ammobox addWeaponCargo ["AA12_PMC",4]; _ammobox addMagazineCargo ["20Rnd_B_AA12_74Slug",30]; _ammobox addMagazineCargo ["20Rnd_B_AA12_HE",30]; _ammobox addMagazineCargo ["20Rnd_B_AA12_Pellets",30]; }; [color="#FF0000"][... case 3-8 exempted for brevity][/color] case 9: { _ammobox addWeaponCargo ["ACE_TOWLauncherSingle_Tri",4]; _ammobox addWeaponCargo ["TOWLauncherSingle",4]; _ammobox addMagazineCargo ["ACE_TOW_CSWDM",8]; }; }; Also is this the best approach for a "slot machine" style ammo crate filler? I've also considered making seperate crates for each case and setting the condition of presence for the randomized publicvariable, although i think i might still have the same problem if i'm doing that incorrectly in the above code.
-
Takes me back to ArmA I, also nice to see the CDF getting some western equipment. Will we see a medevac bird perchance? Keep up the good work!
-
To begin, i really like this mod. It adds loads of depth to even the most mundane single player gameplay, and it also greatly rewards people who like to manage inventory and bring along extra equipment just in case (like myself). I skimmed the last 13 pages and didn't see anything about this so I'll assume it hasn't been brought up. Is there a way to change the models of the suicide bombers/IED triggermen? ideally to Chernarussian civilians. I have absolutely no experience with modding but i assume the Takistani civilian models are all in an array in the mod? If so is it possible to change them to Chernarussians through a script? On a slightly related note, I really enjoyed your roadblock duty mission Reezo, i would love to see more like it (perhaps with EOD mod support?). Keep up the good work!
-
Help with trigger height
merlin replied to lax's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm not terribly knowledgable about scripting but if you're using triggers on the map you could just group it to the group leader and change the type from "vehicle" to "any group member". I believe you would have to do this multiple times for multiple groups.The trigger should only be fired when one of the group members is in the area with this approach. -
I'm working on an asymetrical PvP mission where a group of defenders is attacked by a one/two man sabateur team. In order to mix things up and add some tension to the mission I want the sabateurs to be able to call in a guerilla attack on the defenders (Available X% of the time). The problem i've encountered is how to signal the attack. What I've considered Radio option to signal attack: This option would be available for both sides, removing radios from the defenders did not remedy this and all of the threads here indicated that this can't really be circumvented. (If someone can prove me wrong this would be a very simple solution and i would appreciate it) Static radio: I wanted the sabateurs to have the liberty to call in the attack at their leisure. Action menu option: I don't really want to clutter the action menu but i suppose this could be done of all other options fail. Trigger detecting a Flare: My option of choice, potentially allows the defenders warning of attack and is realistic. I remember Rocket released a mission called Island Twilight where a smoke grenade would signal an ammo drop from a C-130, which leads me to believe the same effect can be achieved with a flare. Although i have no idea how he achieved this. http://www.armaholic.com/page.php?id=6481 My Attempt: Trigger covering the area for flare detection in the conditions box: (({_x in (list this)} count F_40mm_White) > 0) Furthermore, is there a way to make the trigger detect an array of smoke shells rather than just one type?
-
@Jedra I think the only way to transport the m119 in ace is to use slingloads.
-
that last picture looks really impressive, if i didn't know better i would have mistaken it for something BIS would have included in OA. Speaking of OA have you considered placing a VS-17 signal panel on the model, or perhaps a proxy so it could be toggled on/off by mission designers? I'm not sure how authentic this would be though considering they were most likely introduced long after the initial combat operations where they would be most useful in preventing friendly fire. However it does seem like it would add an extra layer of immersion and would have some functionality in online operations. Great work, looking forward to release!
-
ARMA 2: OA 1.60, ARMA 2 1.11, ARMA 2: Free 1.11, ARMA 2: BAF 1.03, ARMA 2: PMC 1.02
merlin replied to Dwarden's topic in ARMA 2 & OA - GENERAL
Much obliged BIS, the level of support you offer for your titles is unmatched by any other developer on the market, it's really hard to convey just how much the community appreciates gestures like this. -
CHU-ville (Containerized Housing Units) and Concrete Revetment Walls
merlin replied to raptor 6 actual's topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
I'd like to see the intermediate height barriers (6 foot ish?) for use in airfields and FARPs to reduce the chance of rotor collision, i'm in no way knowledgable about this and for all i know the large barriers could be used for this purpose. On the subject of textures you may have already considered this but some system for for mission editors to place unit symbols/text would be useful http://i.imgur.com/DXn6S.jpg , The most simple way to do this i imagine would be to release the texture files (perhaps as a .psd?) with the addon and allow mission editors to SetObjectTexture as they desire. looking forward to more WIP shots! -
CHU-ville (Containerized Housing Units) and Concrete Revetment Walls
merlin replied to raptor 6 actual's topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
Absolutely amazing, something i've wanted for a long time. One question though, are you planning on multiple sizes for the reventment wall? for example http://www.afghanroyal.com/?page_id=242 or even the "Scud Bunker" in the following image http://i.imgur.com/sHGrP.jpg . Furthermore I'd like to stress how important it is to have the correctly dimensioned icons for the editor, it frustrates me to no end how difficult it is to arrange BIS fortifications in the editor. Looking forward to release, I think this is the kind of addon that should be included with ACE, as I imagine it would greatly increase the quality of FOBs in missions. -
W.I.P US C.L.S (Combat Logistics Support)Vehicle Pack
merlin replied to f2f_bho's topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
The HET looks amazing, one question though, what is the procedure for spawning one in the editor? would it be two seperate pieces linked by a script or would it spawn as a single functional entity (presumably with some kind of animation wizardry)? -
The loadmaster should be a position seperate from the pilot, usually the crew chief.
-
I see in the description at 0:38-0:40 I see what looks like a new (presumable Apache) HUD with position tracking. should i prepare myself for this addition to ACE? because this video raised my blood pressure a little. Great work DevilDog! oh and i played around with the Kh-29s a little and found them really fun to use, I love how the ACE team adds depth to every imaginable role.
-
Clafghan Map 20x20 Beta Release
merlin replied to minimalaco's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
This is really an amazing map. The scale of the mountains dwarf anything i've ever played before. I spent a decent amount of time when i first opened the map in the editor sitting on the side of a mountain in a D-30 lobbing shells into the valley. My first attempt at a mission was a sort of quasi-MSO firebase resupply/defense/artillery mission. I left a great deal of equipment at the Airfield for a chinook and an assortment of 5tons and humvees to take to FOB Mike II. along the route i had insurgent patrols as well as an insurgent garrison in the immediate area around the FOB. One problem I encountered was with the towers in the FOB, they don't offer much of a line of site for ACE's CSW (as seen in the TOW in the above screenshot). What i would suggest would be to either turn the towers 90 degrees so there would be ample space for a CSW, as well as infantry to use the cover offered by the sandbags. Alternatively, there could be "walkable" sections of walls sandwiched between two Hesco Barriers. I made an example in the 3D editor that can be seen below. The M2 in this screenshot had a very nice field of fire and even offered a decent amount of depression although it's not immediately obvious in the screenshot. One obvious attribute though is the abscence of cover, i suppose this could be solved by the players with ace sandbags or perhaps even by adding sandbags at small intervals to create some kind of modern arrow loop or murderhole. Once again, amazing map looking forward to future releases!