Hank Rearden
Member-
Content Count
17 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout Hank Rearden
-
Rank
Private First Class
-
HELP! Logic or Syntax Error? (script)
Hank Rearden replied to Hank Rearden's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yup. Thank you. Also needed to define the variables in my Init. Wound up doing this in the Init: if (isNil "OBJ_0") then {OBJ_0 = false;}; if (isNil "OBJ_1") then {OBJ_1 = false;}; if (isNil "OBJ_2") then {OBJ_2 = false;}; if (isNil "OBJ_3") then {OBJ_3 = false;}; if (isNil "OBJ_4") then {OBJ_4 = false;}; And restructuring the script like this: if (isServer) then { if (obj_0) then { if (obj_1) then { if (obj_2) then { if (obj_3) then { if (obj_4) then {} else { "4" objStatus "DONE"; MAG_tskObj4 setTaskState "SUCCEEDED"; obj_4 = true; publicVariable "obj_4"; }; } else { "3" objStatus "DONE"; MAG_tskObj3 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj3; obj_3 = true; publicVariable "obj_3"; }; } else { "2" objStatus "DONE"; MAG_tskObj2 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj3; obj_2 = true; publicVariable "obj_2"; }; } else { "1" objStatus "DONE"; MAG_tskObj1 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj2; obj_1 = true; publicVariable "obj_1"; }; } else { "0" objStatus "DONE"; MAG_tskObj0 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj1; obj_0 = true; publicVariable "obj_0"; }; }; Just to clarify, I'm supposed to define the variables at the top of the Init.sqf (before if (isServer) tags?) -
HELP! Logic or Syntax Error? (script)
Hank Rearden posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Simple script. Basically everytime I call it, I want the script to check for the status of the objective variables obj_0, obj_1 etc. and skip forward through the nested else/if/then structure to find the proper script based on which objective variables have been fulfilled. I'm aware I could call this from triggers but due to another script I'm using, this is the method I'd like to use to jump through the list, check vs. public variables and assign the right objective based on where in the if/then/else argument structure the conditions are met. Just headaching over the logic and unsure if it should be if {obj_0 = false} or if {isNull "obj_0"}. Whatever I did wrong, it's not working yet so if you can think of something, let me know. if isServer then { if {obj_0 = false} then { "0" objStatus "DONE"; MAG_tskObj0 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj1; obj_0 = true; publicVariable "obj_0"; } else { if {obj_0} then { "1" objStatus "DONE"; MAG_tskObj1 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj2; obj_1 = true; publicVariable "obj_1"; } else { if {obj_0 && obj_1} then { "2=" objStatus "DONE"; MAG_tskObj2 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj3; obj_2 = true; publicVariable "obj_2"; } else { if {obj_0 && obj_1 && obj_2} then { "3" objStatus "DONE"; MAG_tskObj3 setTaskState "SUCCEEDED"; player setCurrentTask MAG_tskObj4; obj_3 = true; publicVariable "obj_3"; } else { if {obj_0 && obj_1 && obj_2 && obj_3} then { "4" objStatus "DONE"; MAG_tskObj4 setTaskState "SUCCEEDED"; obj_4 = true; publicVariable "obj_4"; }; }; }; }; }; -
Get in Waypoint AI Platoon -> HMMWVs
Hank Rearden posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
So I'm working on a mission where a stranded platoon of marines in HMMWV's (AI) is reinforced by a player platoon. The system I'm working with now relies on the players to arrive (starting a timer) which counts down for the length of time necessary to provide security. The AI platoon is in 4 HMMWV's (their fifth is destroyed) which are empty vehicles. I've already split the platoon into groups for each HMMWV as opposed to their real squad structure and each 'squad' has a designated gunner and driver. I'm trying to use sentry Mode: Combat, Formation: Line, Fire at will for the platoon squads while dismounted. Then once they are ready to mount up (players have provided security and got them through the ambush) they are supposed to follow a GET IN waypoint synchronized to a trigger and get in to their remaining HMMWV's. The HMMWV convoy moves out and is subsequently deleted once safely gone and the players head off to their second objective. ISSUE: AIs will not, no matter how hard I try, mount up in the HMMWV's. The HMMWV's are a mix of marine, US Army, GMV and Special-Operations vehicles. Is my problem that the AI don't recognize the seats in some of the vehicles or is there another way to handle mounting units in vehicles with a script? Or, does the 'GET IN' waypoint rarely work even if there are enough seats? If this is the case, can anyone suggest another method of accomplishing this? -
Question about SCUD missile
Hank Rearden replied to andysfile's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Why wouldn't you just place one in the editor and poke it with a MAAWS HEDP or two? -
Three problems: ULB, Trigger Performance, JIP
Hank Rearden posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Mission breakdown: 47 player insertion to T-stan valley via 2x CH-47's with AH-64 support. AH-64 has integrated ULB which is supposed to allow for remote designation of priority targets before Ch-47s move in and allow for aerial recon/scouting. Objectives in the mission are patrol 'halts' which only require players to remain in a given radius for 15mins in order to time out the halts. Enemy spawns are accomplished via trigger (probability of presence 75%) 30s into the halts which means players will or will not take contact at the halt markers. Regardless of contact status they are still required to complete the halts. Once halts have been completed, extraction to FOB is undertaken and FOB comes under attack a few minutes after they have been returned. What I rely on: ULB module, various external scripts and timer triggers. What my issues are: 1. ULB resynch. Mission requires respawn/JIP. Try as I might I can find zero documentation and no easy scripting commands that will allow for a multiplayer-friendly resynchronization of a respawned ULB with an AH-64. I can't even figure out how to synch a ULB properly to an empty AH-64 so it is available to the operators. Right now synchronizing a ULB to the ULB module and the module to an empty AH-64 makes it so that the ULB is only accessible from outside of the Apache. Synchronizing the module to the pilot units causes it to be accessible only while they are out of a vehicle. So very simply how do I: Sorry, I have searched extensively but there is no documentation on the use of the ULB in missions with respawn. The whole ULB feature is undersupported and underutilized from what I've seen but since it's 100% necessary for the mission I'm working on, I'd like to hear what alternatives there are. 2. Trigger timeout alternative. Right now 90% of the mission's functionality relies on 'BLUFOR PRESENT' triggers which either countdown 30s (to spawn groups of enemies with pop 75%) or which timeout 15min (to accomplish halt objectives). Is there an alternative to these triggers, which will activate when Blufor comes within 150m of say, an empty helipad or even a building with a specific ID and records the 15 minute timer's progress so that all JIP's might get a 'scheduled halt completed' message at the same time as players who initiated the halts. Right now my triggers check to make sure that the activating blufor are no more than 5m above the ground, making it so that infantry and not helicopters can initate the timeout. Current triggers look like: class Item1 { position[]={9121.7168,203.17326,6749.3794}; a=100; b=100; activationBy="WEST"; timeoutMin=900; timeoutMid=900; timeoutMax=900; interruptable=1; age="UNKNOWN"; expCond="this && obj_0 && {((getPosATL _x) select 2) < 5} count thislist > 0 "; expActiv="""1"" objStatus ""DONE""; MAG_tskObj1 setTaskState ""SUCCEEDED""; player setCurrentTask MAG_tskObj2; obj_1 = true; publicVariable ""obj_1"";"; class Effects { }; }; I understand the performance of triggers degrades because of the frequency with which they run. Also, from where I can see it, it is very difficult to update a JIP player as to the status of a timer trigger so that they will get the objective completed at the same time. I'm trying to minimize the numbers of triggers I have running in favour of scripting but have no idea even what I'd start doing (logically) to replace these triggers. 3. JIP always presents a challenge, and since I'm storing my mission specific objectives in publicvariables Obj_0, Obj_1 etc. I used the Briefing Manager to write the briefing I don't really know how to make it so that new players logging in to the server see the updated objective status. Mr. Murray's guide offers rudimentary advice on how to deal with this but I'm relatively new and inexperienced at coding/scripting etc. Any advice on how to make sure that the values of public variables are being stored on the server and resourced/accessed on new player connect would be most valuable. I have a working understanding of the logic but not even a remote idea of what the implementation would look like. Did I mention I'm a code-novice? Thanks in advance for any individual pieces of assistance you might be able to offer me. -
I need an OA chopper lift script
Hank Rearden replied to A-SUICIDAL's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
ACE2 mod uses slinglift/RAV lifter, but you need a guy on the ground with a sling rope to put it on the helicopter's lifting hook. Makes the loadmaster position on a Chinook actually worth something though. -
Kill Trigger
Hank Rearden replied to Hank Rearden's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes that worked. Though until I put {{deleteVehicle _x} forEach (crew _x);deleteVehicle _x; } forEach [b]thislist[/b]; it was deleting every vehicle (static MGs/Helos etc.) on the entire map, even while being operated. Kind of funny too but not in a ha-ha way. ;) Thanks a bunch though, that worked well. -
I have a Trigger which is as follows: SIDE: CIVILIAN STATE: PRESENT NAME: CIVNOMORE FREQUENCY: REPEATEDLY CONDITION: this && {((getPosATL _x) select 2) < 5} count thislist > 0 ON ACT: {deleteVehicle _x} forEach thislist What this does for me right now is it deletes all ground based civilian vehicles that enter the trigger radius. What I'm trying to do is delete a civilian convoy spawned dynamically with a convoy managing script. Convoy consists of a bunch of vehicles full of people. What is happening right now is that the vehicles drive into the radius and are deleted but the people are not deleted and die instantly. What do I need to make this trigger delete people in -crew- and -cargo- positions before the vehicles? I mean watching 10 people become airborne out of a Ural is funny but I want to perfect this so I no longer have a pile of civilian bodies lying around. Since the civs are spawned dynamically I don't want to go to the trouble of defining and naming them all if I can just write a trigger that deletes everything that meets its conditions in order of crew->passengers->vehicles. Thanks in advance.
-
Has anyone thought about modifying the mechanics of the Ambient Civilian generator?
Hank Rearden replied to vostov's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Is there any way to fix ambient civs to work in multiplayer dedicated? It's too nice a feature to be 'broken' unless BIS doesn't want us having civilians in multiplayer easily. -
So I'm trying to get this to work under OA with the CH-47 Chinook, specifically to lift disabled helicopters back to the airfield or a FARP. For some reason, no matter what I try, it will not work. My description: My init: And yes, I have the folder in my mission root folder... but still no joy. What am I doing wrong?
-
AI Compound Holdout
Hank Rearden replied to mercyne's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Any additional info on making the AI fear for its life, camp or shoot through openings would be awesome too. I'm trying to reproduce pretty much this exact same effect. -
Transport Pilot Side Missions
Hank Rearden replied to Hank Rearden's topic in ARMA 2 & OA - USER MISSIONS
...use a 35 million dollar piece of equipment to pluck some dirt farmers out of harm's way? The only reason they do the AM radio warning is the tired 'hearts and minds' schtick, or so they can claim due diligence was observed in regard to Geneva Convention responsibilities when the JDAM hits a kindergarten. Unless you have some kind of portable airport type security and are prepared to do 60(to 120) cavity searches for folk who have never seen a doctor (or a gynecologist) it would be insanity to let one of those people anywhere near an aircraft, let alone inside it. That's more for Vietnam where you could tell how much the locals hated you based on whether they tried to kill you or flee the moment they saw you. But uhh... you're on the right track I guess. Have to have at least the crew chief or co-pilot to direct the pilot on tight approaches, since the server I'm making this for has restricted 3rd person view outright. The helicopter is a little long to bring down entirely blind. Injury system is ACE2 but I've never actually seen someone have to be CASEVACed and I've been playing A2 since the day it was released. I only wish that would happen more often. As to resupply, logistics is a valid point but even a full platoon employing good sustained fires on contact will need at most a single airborne resupply and I have two Chinooks up (necessary to fit a full Ranger Platoon). Hence why I'm headaching over what to do with my pilots other than have them circle like idiots and get shot at with SA7s. -
Ok, so suffice it to say I have a mission in the works which sees a Ranger Rifle Platoon being deployed to an FOB in a hotly contested valley. Their ride to the fight is 2x CH47 Chinooks and their overwatch comes in the form of an AH64D Apache Longbow. I've drawn most of my force organization straight from the field manuals and have created a very realistic setting for the mission. It is a simple 6 objective mission. 1. Cross LOD 2. Make Scheduled Halt at OBJ1 (manually verify target structure) 3. Make Scheduled Halt at OBJ2 (manually verify target structure) 4. Make Scheduled Halt at OBJ3 (manually verify target structure) 5. Return to FOB and relay verification, issuing 15 minute warning AM radio broadcast to civilian valley residents. 6. Verify that civilians/friendlies have completely cleared target zones and 'clear hot' AI F35 JDAM strikes. The patrol is conducted on foot. The initial deployment by air simply moves the ranger platoon from the airfield at Loy Manara to the staffed FOB. They are not living at the FOB, just using it as an OP for their presence patrol in the valley. Rangers are being deployed due to recently observed takiban movement. I think there is enough in the mission to keep the AH64 pilot entertained. Since the spawns are limited (largest being 9 men with maxed skill in an 'ambush' from buildings) I have given the AH64 two mountaintop 'strongholds' which are outfitted with both competent AA units and lots of explodey stuff to satisfy his bloodlust while the infantry is making their slow arduous trek through hostile IED infested countryside. My issue arises in keeping the Chinook pilots entertained. I could make some kind of CAS bird or a second Apache available to them but to be quite honest, that seems too 'gamey' for my tastes. I want the chinook pilots (and all 3 gunners) to actually perform the duty they signed on for. I have devised a brutally difficult (but not impossible) helipad at the FOB, which involves landing the chinook on a slope in a H-Barrier enclosed area only 20m longer than the helicopter itself. I can complete the landing in both first and third person both with significant time to maneuver and under consistent small arms or anti-aircraft fire. I know that it is possible but it is also very easy for a nervous, twitchy or careless pilot to completely botch. I am trying to envision some kind of relatively easily coded side mission that might involve repeated landings by both Chinook pilots on said helipad. There is JIP and Respawn in the mission but between the odd CASEVAC and a few sporadic JIPs I'm not certain whether the pilots will really have enough to do. So, that being said... what do you suggest I provide to entertain 2xpilots and 6x door/rear gunners for the duration of a Ranger Rifle platoon foot patrol?
-
Game logic object - attaching spawned weapons.
Hank Rearden replied to Hank Rearden's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This worked, thank you. Was the difference between the table and the pallet that the table was under 'furniture'? I've previously had problems attaching laptops or radios to tables. I've also noticed that the table uses a different physic to the pallet, flying away if driven into, being affected by gravity etc. -
Game logic object - attaching spawned weapons.
Hank Rearden posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
*SEARCHED BEFORE POSTING* I'm trying to create a grouping of objects to represent an insurgent arms cache. What I have so far is a wooden table with some ammo crates piled around/on it. I also have two separate object groupings spawned in game logics using the box = weaponholder command to spawn weapons directly on the ground. I'm having issues in figuring out how to elevate these weapons or the game logic controlling them. Alternatively, is there a way for me to attach them to the table? As above, I tried using the attachTo command to connect them with the gamelogic but that didn't fly either. Care to point me in the right direction?