kilrbe3 35 Posted October 26, 2012 (edited) Hello all; First and foremost, this isn't a rant or a issue I need DIRECT help with, more a "Why?". I have been mission making for about a year now, making small 2-4 player Co-Op missions for me and my buddy. I have grown my knowledge greatly in a year and expanded on features, in-game scripts, and lovely detail. Anyways, Today I ran into a problem making a mission for a friend. A very simple Defend the radio tower from a Russian QRF by Helicopter Insertion and boats. Half way through I noticed things were not working and just breaking on their own. Half the times helis would land, half wouldn't. So i figured it was a Terrain problem. As the LZ is near the Beach north of Brezino by the Olsha Radio Tower. First I had the LZ's near the clearing around in and the forest and half time they would land, half time they hover, be confused, and land maybe 30secs later. Other half time, they land in a tree and blow up. Moved LZ's around again to near the beach, and so far successful. THAN, I discovered they wouldn't unload their troops with the "Transport Unload, or GET OUT, or Unload" waypoint. Neither would the boats. As all units are in cargo in their respective vehicle. I got confused and looked on my previous missions that used a Heli insertion, and my commands were correct and waypoints, yet they weren't unloading. But they were on my other missions. Than I spent close to an hour trying different Waypoint init lines, and finally got it too work with this "{unassignvehicle _x; dogetout _x} foreach units group player;". After almost 2hrs getting mad and figuring out why it worked on older mission just fine but not this. I checked to make sure no script or trigger was blocking it, nothing was. THAN, the boats wouldn't unload, same WP init line worked "{unassignvehicle _x; dogetout _x} foreach units group player;" THAN, the MASS AI drop script was playing funky. Half time the C130s (represent AN-124s) would do a circle, than follow their MOVE WP and THAN unload at the trigger like its designed for. Half time it worked great, other half they did a circle before coming in. THAN (yes again), Testing in MP, and the AI just turns dumber than dirt and doesn't do what it does in Editor Preview. Half the choppers miss their LZ, half hit it fine. The AI Drop still does a circle, sometimes dont. Just in general, the AI acts much more stupid in MP than it did in "Preview" mode. ~ So my question really, why does ARMA sometimes just go belly up on things and to make things work, you need two steps that do the EXACT same task sometimes? Yet other times it works just fine (like my older missions, that are even simpler and less complex). IN summary, I tried everything under the sun until I found {unassignvehicle _x; dogetout _x} foreach units group player; Which just worked like magic and made everyone get out of their respective vehicle. Yet I still can't explain why once you try MP testing, things just break, don't work, or work 50/50 time. Is it just ARMA being ARMA? I figured that out on like week 2 of mission making a year ago, sometimes ARMA just throws fits like a crying child. Is there something I should know in the future? Am I making simple task too complex? Not understanding something? :confused: Any advice I gladly take! It really gets confusing when you get awesome ideas running in your mind and you KNOW arma can do it, but it takes so long to get it done and working completely. I thought my last mission was polished, yet its been 4 months and I'm still finding things that break just for no reason before I release to public. !Thank you for reading, I really hope they make things in ARMA 3 for mission makers more simple, even if its just 1x easier and fix things that I have noticed have been broken for ages since OFP! EDIT: Mods used are all standard ACE, and ACEX, along with ASR AI and various unit mods. Most from "Project Awesome Mod List from Reddit" Edited October 26, 2012 by KilrBe3 Share this post Link to post Share on other sites
Kempco 10 Posted October 26, 2012 NEVER use "player" in the init line of anything placed in the mission editor. The Editor runs everything globally. So if you refference "player" as a unit, as shown in the example, then it will only be recognized if the server is the player (Meaning you are hosting the game). You really run into issues with this if you are playing on a dedicated server. On a dedicated server, the server is not a player and therefore every refference to player in global space will be returned as null. You could look into isplayer, but that may confuse you more as it works much differently. One refferences a unit directly, the other checks if the unit in question is controlled by a player. I reccomend reading about locality. The easiest way to check for locality issues is to host a mission in the MP editor locally, and log in twice. That way you can alt tab between both units, one where you are the server and one where you are not. Share this post Link to post Share on other sites
kilrbe3 35 Posted October 26, 2012 NEVER use "player" in the init line of anything placed in the mission editor. The Editor runs everything globally. So if you refference "player" as a unit, as shown in the example, then it will only be recognized if the server is the player (Meaning you are hosting the game). You really run into issues with this if you are playing on a dedicated server. On a dedicated server, the server is not a player and therefore every refference to player in global space will be returned as null. You could look into isplayer, but that may confuse you more as it works much differently. One refferences a unit directly, the other checks if the unit in question is controlled by a player. I reccomend reading about locality. The easiest way to check for locality issues is to host a mission in the MP editor locally, and log in twice. That way you can alt tab between both units, one where you are the server and one where you are not. Thanks, I appreciate that tidbit and for future reference.. But kinda doesn't answer the questions I had or explain things. Also than, what do you suggest I change that init line too than? Removing 'player' breaks it now. If I don't have that line they just sit there like a idiot or don't do what told. Too be honest, I have spent now, close to 7hrs today alone just doing this one mission, and all my problems are centered around a simple get them out of whatever they are in. But, like I said, works just fine on my older missions, with a simple "Transport Unload" WP. I have made double checked my WP, units, init filed and all. At this time in place, I'm ready to just upload the folder and have someone look at it, sadly I'd also be embarrassed to mars and back if it was something simple, or they look at it once and go "wow, what a mess". It's not like I'm trying to "play with things and try it" I have read many tuts, watched many videos in the past and all that to get to where I'm at now with my mission making knowledge. I have re-checked my bookmarks that had simple tuts like "heli insertion" and etc and all check out fine in-game. -Be3 Share this post Link to post Share on other sites
Kempco 10 Posted October 26, 2012 First: Define the group in global space i.e. MY_unloadGroup = group this. Or you can define the vehicle. (Just to make sure). {unassignVehicle _x; _x action ["Eject",vehicle _x]} foreach units MY_unloadGroup; Share this post Link to post Share on other sites
kilrbe3 35 Posted October 26, 2012 Seem to have the eject cargo sorted. I removed {unassignvehicle _x; dogetout _x} foreach units group player; and didn't use {unassignVehicle _x; _x action ["Eject",vehicle _x]} foreach units MY_unloadGroup;. It just instantly started working. But i think several factors were / still are in play.A) The linebacker on the hill takes pop shots at incoming helis. It is suppose too, and if some get shot down, oh well, way its "planned" out. But I think (possibly) they saw the Linebacker as a threat and some would do a circle when they got close and than try again for a land, but would just end up dying for a Stinger or its Main cannon. Limited the AA ammo, seems to help, as he tends to only got after 1 or 2 helis, and not try for all of them now to take down. So that SEEMS to work. B) The area is around a forest, the LZ's are bigger than freaking Vietnam LZ areas, plenty of room!!!!! But I think AI is being AI and sometimes takes it sweet time to land, even with plenty of room, possibly trees cause issues maybe. **IS there a way to speed up their landing?? Even with "Full" speed on the WP, they pull up near the LZ, line up, and than go down slowly to land on the invisible H. Is there a way to speed that process up? C) Things STILL play completely different in MP compared to Editor. Sometimes AI does what told, sometimes it dont. But I exported it to MP and loaded a MP server EACH time for EACH assault team. (Loaded and played as a Helicopter landing, Loaded again as Boat Landing, and Loaded again as a Helicopter landing taking NE Airfield in Chern) All landed and troops got out like told and flew away. (Sometimes though) sometimes one would like miss its LZ and do a loop and have to re-try and land. Sometimes one would get hanged up mid air over its LZ and hover and min later try and land again.. Why is it that the Editor plays so smoothly and works as planned, but soon as MP tested, things just go slightly different??!? Does this happen to anyone else? I've spent 12+hrs on this today, My brain is done. Thank you all great ARMA community and these forums for your help, wouldn't know what to do without all this great info here and on various sites! -Be3 Share this post Link to post Share on other sites
Lt_Phoenix 0 Posted October 26, 2012 I've been bashing my head against the wall with this mission editing too. Especially when it comes to landing AI helo's on LZ's and unloading troops. Luckily I discovered a solution in the forums yesterday. Use the "TRANSPORT UNLOAD" waypoint and write the following in the init field: (insert heliname) land "LAND" Example: heli1 land "LAND" "LAND" causes the heli to turn of it's engines, so you can use "GET OUT" if you want the rotors still turning. Not sure how to fix the boats unloading though... Share this post Link to post Share on other sites
Kamakazi 11 Posted October 26, 2012 (edited) I had a lot of similar problems a while ago, had a BAF chinook landing into a hot zone, lots of unfriendly infantry about. The pilot responded to the threats and usually hit the ground/ mountain before clearing the bad guys out. Eventually used a couple of the newer AI commands - using Arma OA - placed this into a waypoint on its approach, before the "unload" part. The pilot was a specific named unit added to the empty chopper, all my crew were named individualy and boarded with the player cargo pilot disableAI "AUTOTARGET"; pilot disableAI "TARGET"; pilot disableAI "MOVE" This stopped him engaging, calling targets and moving to engage them leaving his gunners free to fire independently. Will take a little adjusting - the order of the waypoints when he goes into danger etc - worked well for me - the gunners engaged all the way onto the ground - during unload and on the take off/ way out. It forced the pilot to stay on the waypoints regardless. Hope this helps. The locality thing is important - good luck with that, basically keep the SERVER in control - anything defined on the Map from the beginning are global like the poster said earlier. If you need a working example of this I can point you to my map hosted on the [LOL] Clan server. co08_baf_LOL_Insurgents_V2 Same thing should work with the boats, I would have a specific unique driver name and refer to him as a global variable in the same way. Remember, I use the waypoints they good way to stay global and have a series of 'steps' as the unit/ driver/ vehicle approaches, delivers, waits, then buggs out. Edited October 26, 2012 by Kamakazi extra stuff and spelling Share this post Link to post Share on other sites
Lt_Phoenix 0 Posted October 27, 2012 Eventually used a couple of the newer AI commands - using Arma OA - placed this into a waypoint on its approach, before the "unload" part. The pilot was a specific named unit added to the empty chopper, all my crew were named individualy and boarded with the player cargo pilot disableAI "AUTOTARGET"; pilot disableAI "TARGET"; pilot disableAI "MOVE" This stopped him engaging, calling targets and moving to engage them leaving his gunners free to fire independently. Will take a little adjusting - the order of the waypoints when he goes into danger etc - worked well for me - the gunners engaged all the way onto the ground - during unload and on the take off/ way out. It forced the pilot to stay on the waypoints regardless. Hope this helps. Ok thanx for the tip. Gonna give this a try. Which works best, grouping the crew with the pilot or grouping them for themselves? Stupid question: how do you assign the 2nd gunner? Using assignAsGunner an moveInGunner for the 1st one, but it doesn't work on the 2nd. Also tried moveInTurret with no luck... Tried searching for the right command too... Share this post Link to post Share on other sites
Kamakazi 11 Posted October 27, 2012 good question, think i had an Ai group all individually named - just gave it a waypoint to board the chopper first, before any cargo - Ai will (usually) fill all the weapon stations first. Lost my original reference sorry - turrets a pain sometimes - quick search got this - might help if you can read its code. One of the real code heads might come up with better http://forums.bistudio.com/showthread.php?116330-assignAsTurret-moveInTurret-workaround&highlight=chinook+gunners and http://community.bistudio.com/wiki/moveInTurret Share this post Link to post Share on other sites
seba1976 95 Posted October 27, 2012 EDIT: Mods used are all standard ACE, and ACEX, along with ASR AI and various unit mods. Most from "Project Awesome Mod List from Reddit" All these mods will run interference too. I use some of them, and I love them, but they are one thing more to consider (and deal with) when you're developing scenarios. Share this post Link to post Share on other sites
Lt_Phoenix 0 Posted October 28, 2012 (edited) good question, think i had an Ai group all individually named - just gave it a waypoint to board the chopper first, before any cargo - Ai will (usually) fill all the weapon stations first.Lost my original reference sorry - turrets a pain sometimes - quick search got this - might help if you can read its code. One of the real code heads might come up with better http://forums.bistudio.com/showthread.php?116330-assignAsTurret-moveInTurret-workaround&highlight=chinook+gunners and http://community.bistudio.com/wiki/moveInTurret Unfortunately I'm unable to make the crew board choppers when starting the mission on the LHD Khe Sanh. Trying to figure out how to make the crew start in the chopper at the start of the mission in order to use those pilot scripts you posted earlier. Seems I've met another wall to bang my head into... EDIT: Finally got the moveInTurret to work. Used this "MoveInTurret [heli1,[0]]" for the regular gunner and "this MoveInTurret [heli1,[1]]" for the right doorgunner. Edited October 28, 2012 by Lt_Phoenix Share this post Link to post Share on other sites