ladlon 10 Posted January 17, 2010 Here's one that frustrates me... I have a copter with full crew sitting there (I'm not in it), and the pilot either gets shot or buggers off. I order the copter to fly to some other point on the map, they confirm, yet just sit there. I later realize it's because the pilot's seat is empty, but there doesn't seem to be a way to get the copilot or even gunners to go into the pilot's seat so they can actually fly the copter. Frustrating when you are standing there watching them sitting and doing nothing, but even MORE frustrating when they are not within visual distance, and you are assuming they are on their way (after hearing them acknowledge the order, and not give a 'no can do' to it). Any help on this? Is the original pilot the only guy who can fly the copter? Also, PLEASE tell me there SOME way to order a copter to just land without resorting to a disembark... (where the pilot gets out, and even worse, decides he wants to join us, rather than staying by the copter)! Share this post Link to post Share on other sites
dmarkwick 261 Posted January 17, 2010 Rather bizarrely, there is no "land" order. Or at least I've never seen one. To get another unit to pilot the chopper, you'll need to get him to disembark, then get back in as pilot. You'll need to fiddle about with the various unit commands to work out how to do this, select the unit, then use the 1-0 keys to work through the menus, using the backspace key to retrace the menu when you hit a wall. Eventually you'll find the commands :) Share this post Link to post Share on other sites
Rayers12 19 Posted January 17, 2010 There should indeed be land and turn off commands, indeed. Share this post Link to post Share on other sites
ladlon 10 Posted January 17, 2010 Well, is there at least a way I can give the choppers unlimited fuel? I know it's not realistic, but not being able to tell the copters to just land and chill out for a bit until you need them is really restrictive. Again, I'm just doing a simple, non-scripted scenario with the Secom module (random missions), and want to have an Apache and Huey at my disposal when I need support or transport. Is there an easy way to set up a home base for them, and have them 'return to base' (landing as well)? Or any way to rig up the ability to call in an Apache and/or Huey that is not part of my group? Share this post Link to post Share on other sites
dmarkwick 261 Posted January 17, 2010 All of the above is possible :) you could have helos sitting switched off at mission start at the airfield, then call them in only when you need them. That will save on fuel. When you start to get into simple scripting (which isn't as scary as you might think ;)) you will be able to easily park helos and get the pilots to stand outside it for the duration (again saving fuel) then get them to mount up & fly in somewhere. But I fear these cannot be done by simple editor placements unfortunately (apart from the helo-waiting-at-the-airfield thing at mission start). Share this post Link to post Share on other sites
ladlon 10 Posted January 17, 2010 I see a crash course in Arma2 scripting in my near future.... :) Share this post Link to post Share on other sites
dmarkwick 261 Posted January 17, 2010 The best place to start :) Share this post Link to post Share on other sites
ladlon 10 Posted January 17, 2010 Yep. Downloaded that when I first joined the forums. Read through it briefly, but I'm actually going through it more carefully tonight, just to see if I can learn enough to do what I want quickly. Otherwise, it'll have to be some rainy day project (....along with my 100 or so OTHER rainy day projects). Trying to learn the radio triggers right now.... Share this post Link to post Share on other sites
JSj 12 Posted January 18, 2010 I see that the guide is for ArmA. Are there no differences compared to ArmA 2? Is everything still the same? Share this post Link to post Share on other sites
dmarkwick 261 Posted January 18, 2010 I see that the guide is for ArmA. Are there no differences compared to ArmA 2? Is everything still the same? Everything is still the same, but there are a few additions to ArmA2 that I expect are not in ArmA1 guide. However, as a starter for scripting it's still the best resource available, and by the time you're wanting to use the new features that ArmA2 script supplies you'll be reading that stuff directly from the Biki :) Share this post Link to post Share on other sites
JSj 12 Posted January 18, 2010 Ok, sounds great. I will definitely get that guide then. Thanks for the info. Share this post Link to post Share on other sites
Grizzle 0 Posted January 18, 2010 There is actually a 'land' and 'landAt' command available through scripting. I've tested both of them and they work. But yes, through the GUI those commands don't seem to be available. land: 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) Available since ArmA 2 57463 build. Example 1:_cobraOne land "LAND" landAt: Order an AI airplane to land at a given airport. ID is the number to identify which airport on the island you want . Example 1:_plane1 landAt 1 Share this post Link to post Share on other sites
ladlon 10 Posted January 18, 2010 So, for example, if I have a radio trigger, can I have code in the On Exec field that controls the helicopter with something like _Apache landAt MyBase? (The syntax is probably wrong, as I do not know the proper syntax yet... Just asking if you can address another object (via their name in a script command in something like the triggers own settings page... or would you have to have the trigger change some global variable which some code on the helicopters page would then check (via the conditions field)? Share this post Link to post Share on other sites
Grizzle 0 Posted January 18, 2010 (edited) So, for example, if I have a radio trigger, can I have code in the On Exec field that controls the helicopter with something like _Apache landAt MyBase? (The syntax is probably wrong, as I do not know the proper syntax yet... Just asking if you can address another object (via their name in a script command in something like the triggers own settings page... or would you have to have the trigger change some global variable which some code on the helicopters page would then check (via the conditions field)? Yes, only landAt is for planes while land is for helis. I also think that with planes using landAt that they will cycle around and take off again unless you trigger some sort of hold waypoint at the airport. Here's what I do for Heli's: 1. Drop down a helicopter and name it Heli1 or something to your liking. 2. Create an 'H' object somewhere at the airport. (empty\objects\H) 3. Name it HeliPad1 or something to your liking. 3. In a waypoint or trigger add this: Heli1 land "HeliPad1"; 4. In a waypoint or trigger add this: Heli1 land "LAND"; No matter where the heli is when it gets the command, it will fly to the helipad and land. If you execute Heli1 land "LAND"; it will land wherever it happens to be unless there is a helipad nearby in which case it will move to that and then land. Pretty cool eh? After playing around some more I realized providing the name of the helipad is moot. Using "LAND" or one of the other values are the only items acceptable. What I found was that if the land command is issued and the heli is near a helipad it will land on it. What the range is I'm not sure but it doesn't seem to extend far beyond the airport bounds. For your other problem with the pilot being dead, you can also use script commands to deal with that as well. One possibility is to add an eventhandler to the pilot that fires a script when he dies that moves another crewman into the pilot seat. But you should probably ask about that in the mission editing forums. ;) Edited January 19, 2010 by Grizzle Share this post Link to post Share on other sites
ladlon 10 Posted January 18, 2010 Ah! Now we are getting somewhere... Okay, now adding to what you said here, how would I set the Land waypoint to only happen if I have done a Radio Alpha command? I got the trigger part figured out, but am not sure what the condition on the waypoint should be, nor the On Act code on the trigger should be. Could you fill me in on that? Can I now add some code to the On Act of the trigger and the Condition of the Land waypoint to get it to do that when I give the order only (or are external scripts required)? (I know this should technically now be in the scripting section, but we're finally on to something here, so I want to make sure you get this message.) Share this post Link to post Share on other sites
Grizzle 0 Posted January 18, 2010 (edited) Ah! Now we are getting somewhere...Okay, now adding to what you said here, how would I set the Land waypoint to only happen if I have done a Radio Alpha command? I got the trigger part figured out, but am not sure what the condition on the waypoint should be, nor the On Act code on the trigger should be. Could you fill me in on that? Can I now add some code to the On Act of the trigger and the Condition of the Land waypoint to get it to do that when I give the order only (or are external scripts required)? (I know this should technically now be in the scripting section, but we're finally on to something here, so I want to make sure you get this message.) In the OnAct section of the trigger that is executed using Radio Alpha just add the line Heli1 land "HeliPad1"; if you want the heli to return to the helipad otherwise just use Heli1 land "LAND"; to make it land where it is. (note: "LAND" is a predefined variable that does not need to be created.) You'll also want to set the trigger to 'repeatedly' since you'll no doubt want to order the heli to take off and go land somewhere else at some point. So you don't really need to create a waypoint, I only mentioned that in case one wants to create some patrol waypoints then have the heli return to base and land when it's done. If one wanted to do this they would add one of those same lines to the OnAct. of the last waypoint in the patrol route. The condition should just be left at 'true', your only concern is the OnAct field. Does that answer your question? Feel free to PM me directly if you need more help. Edited January 18, 2010 by Grizzle Share this post Link to post Share on other sites
ladlon 10 Posted January 19, 2010 Sorry, I tried PM'ing you, but the message was too long... Well, the landing thing wasn't working for me for a while, and I was getting frustrated... but then realized that I simply forgot to put the Helipad1 part in quotes. Tried it again, and it worked!! (Hehehe... Sorry, at this point, ANY success is a huge thing for me....). So, now for the bonus round.... How would I use that same technique to make the copter come over to my teams current location? I was thinking the Join command, although I don't know the proper syntax for it (...tried a few things, but all were wrong). Would I have to unjoin them when I do the Land command we established?... or is there a better method rather than Join? I DO like the Join method, as that allows me then to give commands to the copter (to target specific things, go places, etc). So, ideally, what I would need is a radio triggered 'Start up, take off and come to us, becoming (for now) part of our group'... and then a modification to our existing Land command so that it is no longer part of our group (...and that's only so it won't try and follow us around. If that's not the case, and the Land command will cause it to land and turn off engines and NOT follow us until we call them again, then the ungroup is not necessary.) BTW.... How do you enter multiple commands into the On Act field? The return doesn't seem to work (to go to another line), so do you just put in a semi-colon, a space and then the next command? Thanks for your help so far! Share this post Link to post Share on other sites
dmarkwick 261 Posted January 19, 2010 Multiple commands in the OnAct field are separated by a ";". You could use either a doMove or a moveTo command on the helo to get it to come to you. On radio trigger you have a command that looks something like: Helo1 doMove (getPos Man1); Where you are Man1. Then you either move an invisible helo pad to your location also, or simply get the helo to land where it wants to. I'm sure we can get this thing working :) Share this post Link to post Share on other sites
Grizzle 0 Posted January 19, 2010 Ok. I like a challenge. Do this: 1. Create your Heli and name it Heli1. Don't group it with anything. 2. Create a "join me" trigger (radio alpha - repeatedly) and in the OnAct. cut and paste the following: [Heli1] join player; Heli1 hcSetGroup [group player]; 3. Create a "land" trigger (radio bravo - repeatedly) cut and paste the following to OnAct: Heli1 land "LAND"; [Heli1] join grpNull; player hcRemoveGroup group Heli1; 4. Enjoy the awesomeness that is Arma2 The heli will sit where it started until you do Radio Alpha, then it will automatically join you in formation no matter where you are. You can also now give it orders. When you're done - do Radio Bravo and it will land wherever it is, power down and ungroup from you. Rinse repeat. Of course you should put in blocks so you don't keep executing them in the wrong sequence etc... but I think this should give you something workable. Share this post Link to post Share on other sites
ladlon 10 Posted January 19, 2010 YES!!!!! Okay, excellent! Now I have a radio command that brings the Apache over to me (from a parked, engine off position at the airport), and another radio command to dismiss him (where they return to the airport, land and shut off the engines). NICE!!!!! Okay, some more detailing.... 1) At this point, the copter is not part of my group, so once he arrives, I can't control him (ex. tell him to attack a target). Does he have to be part of my group, or is there some other means to have him attack things once he arrives? What is the equivalent coding for a SearchAndDestroy waypoint/mode (without a waypoint)? 2) Rather than just meeting up with us via the doMove (getPos Me), is there a code/command for him to attack a specific target I'm indicating?... or is that a heavy/external coding thing? I guess the tricky part there is to specify a target... so are we stuck with just a 'search and destroy' mode when he arrives at our position (until I dismiss him)? That's cool too... just a target specification would be sweet. 3) If I do a similar setup with an aircraft, do I position the aircraft at the end of the runway? Do I use a helipad, or some other object to indicate the landing strip? ---------- Post added at 11:06 PM ---------- Previous post was at 11:00 PM ---------- Ah, looks like you may have also found a solution to my new question (regarding control/target specification). That would be excellent. Trying it out! Share this post Link to post Share on other sites
Grizzle 0 Posted January 19, 2010 2) Rather than just meeting up with us via the doMove (getPos Me), is there a code/command for him to attack a specific target I'm indicating?... or is that a heavy/external coding thing? I guess the tricky part there is to specify a target... so are we stuck with just a 'search and destroy' mode when he arrives at our position (until I dismiss him)? That's cool too... just a target specification would be sweet. Using the solution above you can now give the heli targets by selecting them using the F-keys opening your map and mouse over a target - you should see the action menu show "Attack..." left click. The heli will now attack that target. 3) If I do a similar setup with an aircraft, do I position the aircraft at the end of the runway? Do I use a helipad, or some other object to indicate the landing strip? Some aircraft (cough - C130J - cough) are tricky. But they'll usually taxi and take off on their own so you don't need to stick them at the end of the runway. To get the plane to land use the landAt command. The thing is, they will land but will taxi right around and take off again without a waypoint to hold them there. There are other events that can be tied into (LandedTouchDown, LandedStopped) that could be used to tell the plane to stay put after it lands... ;) Share this post Link to post Share on other sites
ladlon 10 Posted January 19, 2010 [A wee bit later...] Brilliant!!! Yup, that works! Previous to this, I simply had the Apache as part of my group, but had him sitting at the airport (whereas we were positioned randomly on the map via a HUGE Placement Radius setting). He would end up starting up his engines and finding us, which was a bit annoying, but usuable. The bigger annoyance was having to tell him to Disembark whenever we wanted him to not waste fuel hovering around over us while things were quiet... especially when I'd have to manually get the pilot back into the copter before I could even give it an order! Not good in a tense situation! Still, it 'worked'... and I had a Huey set up like that as well, so I could call it in to transport us where we needed. But this is MUCH better! Is there a way to have some type of noise or message appear when you do a radio call? Not critical... but it would be nice. I thought it would be in the effects section of the trigger, but the only sample I can find are atmospherics (wind, etc). I'm still trying to get the Return To Helipad thing working... It was working before (when I didn't have the Land Where You Are radio trigger), but now I can't seem to get it to work. Probably just an error in the code or the trigger I'll play around with it some more.... Ya, Arma2 is sweeeeeet. It's my first time with the series. The only things similar that I've played previously were things like the older Rainbow Six games, and Battlefield2. I got Arma2 just before Christmas or so. Blown away by the complexity, the openess, and even the graphics. Runs quite well on my system (Dual Core P2.8 with a NVidia 8800 card). Considering that I'm always just playing my custom scenario (single group against Secom generated enemies), I can probably crank the quality up really high. Bugs? Ya... but with a game this dynamic and random, that's inevitable... and well worth the scope and randomness it provides. Really, my main issue with Arma2 is the controls... The shared key/mouse controls get really annoying (unintentionally doing one thing, when you wanted to do another... as often it's context sensitive). I will look into remapping some of the controls... as well as memorizing/setting up direct key commands for common things (so I don't have to wade through the command menus, which is made more difficult with the twitchy mouse wheel control). That done, I'll be really happy with this all! (...and I've only just been wandering around, on foot, with my single group... and haven't even got into some of the more interesting things... laser targeting, sniping, tank battle, etc. I've flown the planes a bit (very cool), but have found spotting enemies and targeting to be too hard at those speeds (...copters are fine, though). ---------- Post added at 12:32 AM ---------- Previous post was at 12:24 AM ---------- Ooooo, ya the C130J..... I hopped into one once, and tried to taxi with it.... ended up in a forest near the airport. Seemed like the turn radius on that puppy was about 10 miles. (heheh...) Share this post Link to post Share on other sites
Grizzle 0 Posted January 19, 2010 Is there a way to have some type of noise or message appear when you do a radio call? If you use hint it plays a sound and shows text in the upper right corner. You can also use player sidechat "Message"; but it doesn't make any sound. So just add one or the other to the sequence of commands. hint "Joining group"; or player sidechat "Joining group"; Glad to see it works out for you. There's a lot to learn but once you do it really opens up the game. By the way, I was messing with a pilot replacement script, but when I was testing it I discovered the AI already replaces the pilot (at least while on the ground). I walked up and shot the pilot and a few seconds later one of the gunners jumped out and got into the pilot seat. The issue you had may have been a glitch, but I'll keep working on a script if for nothing less than the learning experience. Share this post Link to post Share on other sites
ladlon 10 Posted January 19, 2010 Now that I got one script working, I may be a bit better at figuring out the other commands (via the script list posted somewhere in the wiki or something). I'm starting to understand the syntax a bit now. Ya, you would think that (if given an order) one of the suitable crew members of a vehicle would jump in the pilot seat... or (if they don't have that functionality) give you a 'No can do' response. But, I would have them giving me a 'Solid copy!', then sit there. Happens quite frequently. Then again, I think PART of it is that I noticed that when you give a move command, their actual destination is often quite a bit off from what you specified... and as a result, often they won't move, as they kind of feel they are 'there already'. So, I think in some cases (when the copter is sitting on the ground, with or without someone in the pilot seat), they will not start the engines and take off because they are not intending to move (as they feel they are 'close enough' already). Just a theory... Isn't the guy in the 'copilot' seat of the copter able to fly from his station? Seems to me he wouldn't even have to move (if the pilot were gone). I'm going to try a few more radio command based orders (like getting a Huey to come down and allow me to board). True enough, there appears to be some existing scripts that do all the stuff I'm ultimately after anyway.... and I intend on trying them..... but, it's also good to know how to do at least some of the stuff yourself, too. Just in case the 3rd party scripts are exactly what you want. I'll try out the hint thing. I'll try and find that script list thing again, and go through that again, now that I'm a bit more familiar with the syntax. Thanks for the help so far, guys!! Share this post Link to post Share on other sites
ladlon 10 Posted January 19, 2010 (edited) Hey, Grizzle. I was tinkering around with some more triggers, and am a bit confused as to why this next thing isn't working. Hoped that you could take a quick look, and tell me what I'm doing wrong... I have my existing 'Request Apache' and 'Land Apache' radio commands that work great (thanks!). What I then tried to do was a 'Return To Base' command, much like what we originally were trying to do with the helipads. The coding I have is this: Apache1 doMove (getMarkerPos "Helipad1"); Apache1 land "LAND"; Apache1 join grpNull; Player hcRemoveGroup Apache1; (Where Helipad1 is a MARKER I placed, rather than an invisible Helipad, since I didn't think that the getMarkerPos command would work with an object) What seems to happen when run, is the Apache goes elsewhere (not the marker location), lands, starts up immediately, and flies to the marker, hovering there! Almost like it's doing the first two commands in reverse! Any theories? I'm going to try putting in an invisible Helipad on top of the marker, just to see if that makes a difference. ---------- Post added at 02:59 PM ---------- Previous post was at 02:43 PM ---------- [LATE ADDITION]: In my second test (with the helipads as well as the markers), they did the same thing... BUT, once they were in the area (airport) and told again, they properly landed in their respective parking spots, and shut down. So, I'm wondering if this is something like what you mentioned before with things not working outside of the airport area? I figured that it would move to the marker (regardless of where it was), and then when it hits the LAND command, it would be right on top of a helipad anyway, so even if it didn't KNOW to choose that one specifically, it would find it as the nearest one. Does it wait for a command to be completed (the action, not just the execution of the command) before moving on to the next one? If not, maybe it's landing 'on route' to the marker (...does the gotoMarker command, but then immediately hits the Land command before it reaches it? That would explain why it seems to land first, then go to the marker, and hover there without landing. Any idea how to put in some sort of 'don't do the next command until you reach the marker' type thing? I imagine it could be done with waypoints (...keeping in mind that the waypoints would not be locked areas, as the scenario is always random). Edited January 19, 2010 by ladlon Share this post Link to post Share on other sites