ladlon 10 Posted January 14, 2010 Hopefully this is in the right section. I tried searching around for this, but couldn't find anything on it. I've set up a simple scenario, intended as a quick, random mission thing. Single fire team (with a huge position radius, so we randomly are placed somewhere on the map), the SeCom module and Ambient Combat module (to provide random activity/missions), an Apache and Huey (grouped to us, but placed on one of the larger airports, with the intention of them staying there until I order them in to attack (Apache) a target, or transport us (Huey) as needed during the session. A medivac helicopter is also placed on the airport (not grouped to us), with a single support waypoint made in it's same starting position (to allow it to be called in via the Call Support command/menu). Everything is working fine, except the two copter (Apache/Huey) insist on joining us (rather than sitting and waiting), so after a bit of whining about where we are, they end up coming in to our position (and I then usually give them some other place to go, and often tell them to disembark, so they don't run out of fuel). I'm wondering if someone could tell me how to properly set it up so they will just sit at the airport, but still be in my control.... either as part of my squad, or via some sort of Support command. I'm totally new to scripting, so I'd prefer not to do any heavy coding (unless it's all spelled out for me!). Can anyone shed some light on how this can be done? The old Editing manual (Arma1) doesn't SEEM to talk about this... but much of it is a bit over my head right now. I intend to learn it sometime, but am just wondering if what I want is achieved simply somehow. The two copters don't need to be part of my team... as long as I can call them in and have them attack targets, or let us hop aboard and take us wherever we specify. Thanks! Share this post Link to post Share on other sites
HateDread 13 Posted January 14, 2010 Trigger, set to 'Alpha', etc, like the radio channels. Have 'Activation' field say 'Heli1 moveto getpos player;', etc, minus quotation marks, where heli1 is heli name, and player is your name. This moves them to you. Make them stay before this via... uhhh... I don't know. 'Halt', 'stop', 'waituntill', I'm not sure. I know! Move them somewhere via their init. field, like 'Heli1 moveto position Pad1', where Heli1 is heli name, and Pad1 is name of invisible heli pad or other reference object. When you activate radio alpha, should work. Maybe. It's 1:47 AM, and I think I'm dying of fatigue, so I hope that made sense. Share this post Link to post Share on other sites
Razor91 17 Posted January 14, 2010 try the following in the init-field: doStop this; Now the chopper should start if you give them an order. Share this post Link to post Share on other sites
ladlon 10 Posted January 14, 2010 (edited) Hrmmmm.... Okay, well, I guess I have to jump into init coding and stuff like that. I was hoping it would be just a simple waypoint control panel option kinda thing. I'll tinker with it a bit, but right now I can't dive into learning all the init stuff, as I don't really have the time (...other priorities!). I'll try the doStop this; thing, as that is easy enough. If it works, excellent... If not, I'll live with the 'eager groupies' for now... ;) I wish you could just order copters to land (without the pilot getting out), so they don't burn all their fuel, yet are ready to go when you need then, without having to clumsily persuade the pilot to get back in the copter before ordering him to do something. Are we just stuck with 'Disembark'? Edited January 14, 2010 by ladlon Share this post Link to post Share on other sites
Splicer 10 Posted January 14, 2010 I like setting setfuel to zero and then switch it to 1 (full tank) when I want them to take off and do something. Again, this is my approach... :D Best, Splicer. Share this post Link to post Share on other sites
boneboys 0 Posted January 14, 2010 Tell em "get out" and then a way-point "get in", sync that to a way-point where you know you will want them to come and pick you up again. Works like a charm :D Might help, might not. Share this post Link to post Share on other sites
ladlon 10 Posted January 14, 2010 Will that all work for a non-scripted scenario? Remember that all I have is the SeCom and Ambient Battles mods happening for my enemy action. I've also got my fire team's location randomized by a VERY large placement radius... so pickup/attack locations will never be the same. Share this post Link to post Share on other sites
Splicer 10 Posted January 14, 2010 If you don't want to get into writing scripts I think your only option will be to use synchronized triggers or the like. My 2 cents. - Splicer. Share this post Link to post Share on other sites
ladlon 10 Posted January 14, 2010 Ya, I'll look into it. I just can't invest too much time into heavy scripting learning... at least right now. Share this post Link to post Share on other sites
ladlon 10 Posted January 18, 2010 Ugh.... Well, I've been reading through the Advanced Editor Manual (Arma1), and it's pretty brutal. It helps that I'm familiar with stuff like ActionScript, so the structure isn't completely foreign... but I'm still a bit overwhelmed. Sorry, but could someone give me an outline of how I would set up an Apache to start at an airport, hold there until I radio it in, come over to our position, blow stuff up, then return to the airport (and LAND!) when they either are done killing things, or I give a 'Return home' radio command? I thought I had it figured out, but now the copter isn't even showing up! What I did was create two radio triggers... RequestApache and DismissApache, and (in theory) had each one switch an identical variable to True (ex. On Activation: RequestApache=True). The copter itself would have the first waypoint set to hold, the next waypoint set to Join (with a condition of RequestApache=True), a third waypoint set to SeekAndDestroy, and a fourth waypoint set to Dismissed (with a condition of DismissApache=True). (Not sure if ANY of that is valid... Just my own theories!) Could someone give me an outline of what is needed, or what is wrong with what I tried? I just need some sort of clue on this, as the manual is not really helping me with the syntax or anything right now. Thanks... Share this post Link to post Share on other sites
loshon 10 Posted January 18, 2010 Whoa. You're taking a mighty complicated route. I'm not really sure why you would want control over them, and if you did, it is going to be quite complicated. However, this is what I would do without them in my squad: The helicopter starts off, with it set to "None" (as opposed to "In Formation") at an H (vis or non, doesn't matter) at the airfield. Then, you make a trigger anywhere, activated by Radio Alpha. Use HateDread's code, slap that in the On Activation field for the trigger, and set it's mode to repeatable. The Heli should fly around you and attack things when you press 0-0-1. (It's worked for me before) Then, have another trigger that is activated by Radio Bravo, with anything that tells it to land at the H it started at. I don't know what this would be, but something with "Heli1, Land, and H1" in it. (Where Heli1 is the chopper name, and h1 is the H name.) Now, your idea of procedurally generated waypoints is something I'm unfamiliar with, as I'm quite new myself, but for an attack role it seems unnecessary. Transport would use markers and the such, but I also have no idea about that. If you had a fixed position of engagement, you could simply have the way points synced to the 2nd trigger and the 3rd trigger. (SaD and Dismiss) Having the Helo join the squad seems like it's unnecessary, but it may just be me. Hope I helped at least a little bit! Share this post Link to post Share on other sites
HateDread 13 Posted January 18, 2010 Then, have another trigger that is activated by Radio Bravo, with anything that tells it to land at the H it started at. I don't know what this would be, but something with "Heli1, Land, and H1" in it. (Where Heli1 is the chopper name, and h1 is the H name.) Couldn't it be something like "Heli1 moveto getpos H1", etc, then have a trigger grouped to the helicopter, set to 'vehicle', and 'present', which activates when heli is near the pad. This activates a code such as "Heli1 land "LAND"", which automatically lands the heli at the nearest pad, as per the wiki; Force helicopter landing. Landing mode may be: * "LAND" (complete stop) * "GET IN" (hovering very low, for another unit to get in) * "GET OUT" (hovering low,for another unit to get out) * "NONE" (cancel a landing) Note: Helos will land at the nearest "H" or "Invisible H", if there is one around (within 500m in ArmA). Good luck! Share this post Link to post Share on other sites
ladlon 10 Posted January 18, 2010 (edited) Hey, guys... @loshin: Yep, that's pretty much what I did... although I'm sure I screwed up the syntax or something like that. What I'm basically after is this (in whatever way possible)... 1) To be able to call in support from an Apache (or whatever). Call him, point at a target, and have him help out (and, ideally, then return to base). 2) To be able to call in a Huey to our position, and have them pick us up, and to be able to then tell them where to fly us, and drop us off there. In both cases, it's seemingly a bit of a catch-22 with the VERY little I know of Arma2 scripting. If you make it not part of the group, you can't control it (ex. tell the pilot where to fly you). If you DO make it part of your group, then they will insist on following you, and won't leave after you are done with them, etc. Probably wrong on that, though, as I'm very new to the coding. I've been reading and tinkering with the coding (radio triggers, waypoints like Join, Seek&Destroy, Dismissed, and conditions... but it ain't working! At this point, I think one of the things I'm doing wrong is the syntax of the conditionals. I'm not sure if you have to somehow define the variables first, before checking them as a conditional.... as I'm not sure what their undefined value is. Also, I'm not even sure if my SampleVariable=True; is even valid code (for the Condition field. Still learning this, but am finding the manual is not helping me much. Still need a basic scripting guide that shows the valid syntax. Up to now, I've just had an Apache and a Huey as part of my group, but placed them on an airport, rather than In Formation. It 'works'.... but they quickly join up with us, and I have to manually tell them to go to some other spot on the map and disembark (so they don't run out of fuel doing nothing). Gets really awkward then when I need them, as I have to manually select the pilot, tell him to get back in the copter, then give them my orders when they are finally ready... I'll play around with some of your suggestions again tomorrow or something... It's 2am over here, and I'm starting to think I really should go to sleep! Cheers... Edited January 18, 2010 by ladlon Share this post Link to post Share on other sites
Taurus 20 Posted January 18, 2010 (edited) Using "setFuel" might make the units disembark because the AI thinks the helicopter is useless, which it is. Preventing them to get in per auto when needed. when I have units far away from my location and doesn't want them to join me I put them as "special: none" (you already know this) init: doStop this; and if they still want to take off and fly to their beloved leader. init: doStop this; this action ["ENGINEOFF",this]; Related wiki: Action engine off Or, if you are tired of hearing them calling requesting your location, you could have the helicopters ungrouped, and when you call "Radio Alpha" onAct: [MyLongbow,MyHuey] joinSilent MyGroup; Related wiki: Join silent This will make the helicopters join your group without the 4 join 1 shouts. Having named the helicopters MyLongbow and MyHuey and in your init. MyGroup = (group this) And then for example "Radio Bravo" [MyLongbow,MyHuey] join grpNull This will have to handle them moving back to base, which would require a script for ease. Hope this helps. If not, let me know and I'll do a simple example.(if time allows) Edited January 18, 2010 by Taurus Share this post Link to post Share on other sites
ladlon 10 Posted January 18, 2010 Ya, you know what... If you wouldn't mind, a quick overview of how I'd set up a copter (starting at an airport, engines off) that joins the group when Radio Alpha is called would be great... Just so I get a sense of how things are organzied/done.... as right now, there's just too many variables/possibilities, and too much guesswork and assumptions on my part, that I may be going around in circles.... Again, I got the radio triggers seemingly functioning (I have a custom name for it, which appears in the radio), and I can select it (disappears from radio). I have a copter starting at the airport (I'm assuming it's on the ground, engines off, as I have its status to None (not flying)), with its first waypoint on top of it (Hold), and a second waypoint just off to the right (as I'm assuming it will not go literally there, but will join my team group, wherever it happens to be at the time) set as Join... with a condition of 'RequestApache=True' (...which I have the radio trigger supposedly set by means of a 'RequestApache=True' in its On Act field. I tried synconizing this waypoint to my team, but it doesn't appear to let me. But, again, I don't know if ANY of this is valid. Also, there's some connection happening between that copter and my team that I can't seem to remove. I THINK it's a waypoint connection (created automatically??). Again, I'm SURE this is all very easy... once you know the logic, syntax and general 'way things are done'... But right now, I'm puzzled, as there's too many things that I could be doing wrong here... Just a quick overview would probably be helpful enough to get me in the right direction/mindset... Remember to specify WHERE any coding goes too, please. Thanks! Share this post Link to post Share on other sites
Taurus 20 Posted January 18, 2010 (edited) Here you go :) Example mission I hope I documented it good enough. The helicopter script is execVm:d from the helicopter init line, check the mission and you'll see. It will fly to whereever you are, crashing into trees and etc might happen, but its not the scripts fault hehe! The heli pad is just for accuracy when the helicopter returns to base and land again. Neither is the name I just remembered I put in the name field required. What's going on in the radio trigger is that I just switch the value. The request script set it to false, and waits for it to be true again. Please report any problems you might stumble upon, or if it doesn't work as you expected. Edited January 18, 2010 by Taurus Share this post Link to post Share on other sites
ladlon 10 Posted January 18, 2010 Sorry, I'm feeling seriously stupid here... I don't even know what do do with those three files! I had a look inside those files (via notepad), to see the coding inside. Wow... Complex! I sort of follow the logic, in general (and your comments inside definitely help)... but, again, I'm not sure how all this comes together. Granted, if I manage to actually run these files in the sim, I might see more. I figure the .sqm is a mission file that goes in a mission folder... but where do the other files go? (I'm not kidding when I say I'm new to this) But, one other thing I'm still wondering... Is my own method not going to work? (Where I have the RequestApache=True variable thing in the Conditions, and have the Radio trigger set RequestApace to True? Will my method work at all? Is there just a few things wrong with it that I can fix? I really appreciate your help on this, and hope it's not too frustrating for you. I'm normally good at this sort of thing once I understand the basic logic and procedures. Share this post Link to post Share on other sites
Taurus 20 Posted January 18, 2010 Don't worry. you unzip the file and put the folder ladlonHelicopterRequester.utes in Windows Vista %userprofile%\Documents\ArmA 2 <profile>\<player>\missions\ Windows XP %appdata%\Documents\ArmA 2 <profile>\<player>\missions\ e.g. ...\Taurus\missions And then the mission will show in your editor. You are on a good way there. However the boolean operator RequestApache needs to be checked as follows Trigger condition: RequestApache Is true or Trigger condition: !RequestApache Is false. Where ! means "not" I sent you a PM regarding this if you want to have a look. Share this post Link to post Share on other sites
Splicer 10 Posted January 18, 2010 Sorry, but could someone give me an outline of how I would set up an Apache to start at an airport, hold there until I radio it in, come over to our position, blow stuff up, then return to the airport (and LAND!) when they either are done killing things, or I give a 'Return home' radio command? Look into Draper's Air Support Script where you can use the radio and a script to call for support (e.g., cobras, Apaches). You can place wherever you want the marker where the choppers will take off from, call the choppers with the radio, mark in the map where to attach, they come, do their thing, and fly back home. :cool: I hope this helps. :D Best, Splicer. Share this post Link to post Share on other sites
ladlon 10 Posted January 18, 2010 @Splicer: Yep, I just noticed all the cool scripts available at Armaholic yesterday. Once I'm more familiar with the installation of scripts (editing init files, etc), I'll definitely try some. Looks like they have a few that address exactly what I want! @Taurus: Thanks for your patience! Got your PM. Guide looks good so far! I'll read it through hopefully today. Looks promising so far! Share this post Link to post Share on other sites
Splicer 10 Posted January 18, 2010 There's tons of goodies at Armaholic once you start digging/getting into scripting! :D Let us know how it goes and good luck! Best, Splicer. Share this post Link to post Share on other sites
Grizzle 0 Posted January 19, 2010 This can be done without scripting. 1. Create the Heli 2. Create a waypoint of MOVE 3. Create a second waypoint of MOVE. 5. Add a trigger 6. Set the trigger to Radio Alpha (don't set anything else but the name and text if you want). Close the window. 7. Hit F5 and drag a line between the trigger and the FIRST waypoint. 8. Position the FIRST waypoint directly on top of the heli. Preview. The heli will sit there doing nothing until you issue 0-0-1. Then it will take off and fly to the next waypoint and hover there until you tell it to do something else. Share this post Link to post Share on other sites
loshon 10 Posted January 19, 2010 But that's going to a fixed location, without joining the squad, and taking no special actions... I think Draper's script is your best bet, it works very well. Installing scripts is easy, so I'm gonna assume you know. If not, be sure to ask! Share this post Link to post Share on other sites
ladlon 10 Posted January 19, 2010 You assume wrong... :rolleyes: Ya, please give me a quick lesson in installing scripts. Seems like the scripts have documentation to tell you, but some of them are a little cryptic (they assume you are familiar with the files, locations, procedures, etc). So, a simple overview would be helpful, to fill in the gaps. Share this post Link to post Share on other sites