Forum Jump :

Author Message


Posts: 95
Rank:


Level: Member

Country: us
Location: North Carolina
Occupation: Mission Dev.
Age: 34
In-game name: Siege-A

 
#1 Posted at 2013-12-20 03:23        
     
Now before I begin, I know and understand that this topic has been covered thousands of times, but to my knowledge, there hasn't been anything on chopper skidding on uneven terrain. Many here should already know that choppers in ArmA don't necessarily land completely when doing a transport unload, which if done over uneven terrain, will sometimes result in the chopper slowly skidding away as troops are being unloaded...which furthermore can result in unneeded troop injuries and casualties. Now many would say, 'just move your LZ to a flat area'...but that's not what I want to do, as I know that the choppers can land here and stay grounded if done correctly while the cargo gets out. So, on with what I've developed in order to make this happen, I'm just curious to know if there is an easier method to achieve what I'm going for.





Here is the code for each of the waypoints:

1. ON ACT: USAchopper01 land "USAhelipad01";

2. COND: (getPos USAchopper01 select 2) < 0.1 AND (speed USAchopper01) < 0.1 AND (USAchopper01 distance USAhelipad01) < 10
ON ACT: USAchopper01 flyInHeight 0; USAchopper01 engineOn true;

3. COND: (not(alive USAdelta01) OR not(USAdelta01 in USAchopper01)) AND (not(alive USAdelta02) OR not(USAdelta02 in USAchopper01)) AND (not(alive USAdelta03) OR not(USAdelta03 in USAchopper01)) AND (not(alive USAdelta04) OR not(USAdelta04 in USAchopper01)) AND (not(alive USAdelta05) OR not(USAdelta05 in USAchopper01)) AND (not(alive USAdelta06) OR not(USAdelta06 in USAchopper01))
ON ACT: USAchopper01 flyInHeight 35;

4: COND: (getPos USAchopper01 select 2) < 0.1 AND (speed USAchopper01) < 0.1 AND (USAchopper01 distance USAhelipad01) < 10
ON ACT: USAdelta01 action ["Eject", USAchopper01]; unassignVehicle USAdelta01;

5-9: These waypoints are same as #4 but with 1 second timeout, COND: true, and for each different unit unloading from the chopper

First 3 waypoints are for the chopper (MH9) and 4-9 are based on Game Logic placed. I have tried tons of different methods, alternating code, and sync of waypoints, but all caused unpredictable chopper behaviour...sometimes not landing, sometimes not going to next WP, sometimes taking off during unload, etc. Doing the simple 'Transport Unload' synced with 'Get Out' makes the chopper hover rather than land (which is not what we want on uneven terrain). Doing any type of unassignVehicle, leaveVehicle, or unload commands after land order will sometimes result in chopper taking back off after touching down, just to land back again.

I could go on but my question is, can I achieve this same result through a more simple format?

And please, BIS, make choppers land COMPLETELY when performing a Transport Unload.

UnderSiege Productionz

Author Message


Posts: 635
Rank:


Level: Member

Country: uk
Location: N.W.
Occupation:
Age: 30
In-game name: big_wilk

 
#2 Posted at 2013-12-20 06:40        
     
Hi maybe this would help you out, the land command does not work quite like this:
 USAchopper01 land "USAhelipad01";
(though what your have written will work), its actually actually telling the helicopter to do preset things. It works like this:
Heliname land "LAND";
your options are:

"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.

Read More: http://community.bistudio.com/wiki/land

Land will make the heli do whatever ever one of those you chose when it reach the waypoint (it finds flat ground and lands). If you place a helipad near the Tran Unload waypoint it will always land there however.

Bellow are a few examples that might be useful to you in terms of makeing it simple though you have the right idea really, Bis really needs to make a few more commands for helicopters as with what we have now its really hard to do simple things.

(Though you will note I did in these examples what I just said you can't do! As I made them a long time ago, saying that though they work very well and have never failed me in MP games).

One: http://tinyurl.com/p8zot57
Two: http://tinyurl.com/nskcaf8
Three: http://tinyurl.com/qcc2f2f

This might also be useful to you: http://www.armaholic.com/page.php?id=23892

This post was edited by big_wilk (2013-12-20 07:08, ago)


Advertisement


Author Message


Posts: 95
Rank:


Level: Member

Country: us
Location: North Carolina
Occupation: Mission Dev.
Age: 34
In-game name: Siege-A

 
#3 Posted at 2013-12-20 07:09        
     
Thank you for the help, big wilk. I originally had those waypoints setup as 'USAchopper01 land "LAND"', I only changed it recently after seeing another thread that used this type of command. I always thought people were crazy when giving the name of the helipad object for a land command, but I guess it works just as a standard LAND order would. But even in changing this, it doesn't effect the overall result whatsoever.

I do have a helipad placed directly underneath the waypoints for the land order, but even when issuing a transport unload, it will land at the helipad regardless if it is on flat terrain or not (which is okay), and with the area mine is in...there is no completely flat terrain. The spot which he is to land only has a slight slope to it, barely noticeable, but anytime a chopper executes a transport unload order, he is actually hovering over the ground even if it looks like he is completely touched down. This becomes apparent when over uneven terrain, as the chopper gradually begins sliding across the ground, and as soon as it tries to correct itself...the erratic behaviour begins. The only way I can see to eliminate the sliding, is to have him land and immediately issued 'flyInHeight 0', to keep him permanently grounded until the unload completes.

While I have managed to make this work through the above method, it just seems like alot of coding just to do a simple task...which as you said already, needs to be worked on. I appreciate the input, every little bit helps. I just feel there is something easier that I am overlooking that involves less scripting. Thanks again for the quick reply.

UnderSiege Productionz

Author Message


Posts: 635
Rank:


Level: Member

Country: uk
Location: N.W.
Occupation:
Age: 30
In-game name: big_wilk

 
#4 Posted at 2013-12-20 07:22        
     
Yeah I was under the impression: heli land "atsomeplace"; worked for years.. I guess the command just it just has something it defaults too if no correct command is found coz this works: heli land ""; ?? haha...

I dont think you'll fix this if its on a steep slope, as the physics simulation seems to be your problem as choppers been heavy things will slide down hills lol. Its probs mroe realistic to have them hover slightly over uneven ground I would guess?

You could try one of the velocity commands http://community.bistudio.com/wiki/setVelocity that might stop it sidelining down a hill if it was 0,0,0 just after touch down.

Other wise send your pilots back to flight school and teach them its only a good idea to land in a flat 200mx200m clearing with no power lines.


Author Message


Posts: 95
Rank:


Level: Member

Country: us
Location: North Carolina
Occupation: Mission Dev.
Age: 34
In-game name: Siege-A

 
#5 Posted at 2013-12-20 07:41        
     
I do agree, choppers should hover over their LZ low enough to allow soldiers to disembark if they are over uneven terrain, but I would think the chopper pilots would have enough skill and training to hold it steady over the LZ while they unload, rather than slowly sliding in the direction of the slope. And that's the funny thing too, the slope my LZ is at isn't even really a slope, it pretty much looks flat...but on closer inspection it does have a very very tiny slope to it. I understand what you mean about the physics, and that should be true if the slope was steep and if the chopper was fully landed, but that isn't the case.

I hadn't even thought about the setVelocity command, that could be what I've been looking for all along. Don't have time to check it out tonight, but will definetly give that a test run tomorrow when I'm back to editing. I'll report back after I've given it a shot and let you know how it goes. Thanks again for the suggestions.

BTW, if only we could send these AI pilots back to flight school...because they definetly could use some better training. :-D

Added 15 hours 10 minutes later:

Well, I'm back...and after vigorous testing of the setVelocity command, still no dice. Apparently it seems that any command given to the chopper after it has been issued a 'Transport Unload' or 'unassignVehicle' order is ignored or postponed until after the chopper has unloaded its cargo. Which means, in many cases, the chopper will unload the troops how it sees fit, allowing the AI pilot to decide the best course of unloading, but I'm sorry, I don't trust the AI's judgement one bit when it comes to flying. Even when issuing setVelocity or such before the unload order, simply results in the chopper following your command up until the point where it is ordered to unload, where it then decides its own path on how to do so. It seems the only way I've found to stop the pilot from taking off or committing to his own idea of how and where to unload the cargo, is to issue the 'this flyInHeight 0' command...but this can only be achieved if the chopper lands completely and shuts down its engines (even if it is for only a brief moment). I have even tried using 'flyInHeight 0' after a 'land "GET IN" order, but for some reason, this results in the chopper taking off again after touching down so it can then 'adjust' its height to 0. Therefore, I'm guessing that when the chopper lands and shuts down its engines, it commits to the new flyInHeight immediately, which keeps it from lifting back off the ground again until given a new flyInHeight order.

In conclusion, I think I will just have to roll with what I have working until I discover a better method, still open to suggestions though. I will update the thread with any new findings that I may come across, so this can help others that may have the same issue.

*UPDATE: Waypoint 2 changes, keeps engines on seamlessly once landing with 'land "LAND"'
COND: not(isEngineOn USAchopper02)
TIMEOUT: 0.1

This post was edited by Siege-A (2013-12-21 00:03, ago)

UnderSiege Productionz

Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2013-12-21 00:50        
     
I may be a little wide of the mark but for uneven terrain I just raise the pad a little.

in the pads init
this setpos (this modeltoworld [0,0,3])

the chopper comes in flies to 3 meters and unloads even if given a land "land" or transport unload command because it thinks it's landed.

I haven't checked this in A3 yet.

This post was edited by F2kSel (2013-12-21 01:08, ago)


Author Message


Posts: 635
Rank:


Level: Member

Country: uk
Location: N.W.
Occupation:
Age: 30
In-game name: big_wilk

 
#7 Posted at 2013-12-21 14:33        
     
That's a nice idea might work for this problem. I just had a go at it and it does work but the chopper seems to rotate left and right sometimes.


Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#8 Posted at 2013-12-21 14:41        
     
I think sometimes the chopper tries to move to the player rather than stay put, it could also be wind related.

In a2 you could attach the chopper to the pad when it lands but in A3 it's messes up.


Author Message


Posts: 95
Rank:


Level: Member

Country: us
Location: North Carolina
Occupation: Mission Dev.
Age: 34
In-game name: Siege-A

 
#9 Posted at 2013-12-21 17:54        
     
Sorry for the late response, been tied up with Christmas stuff. Just tried what you posted F2k, and...I love you, you f***ing genius. I ran tests with what you posted, I simply changed it to 'this setpos (this modeltoworld [0,0,0.1])' to allow the chopper to hover even lower, and everything seemed great. I was able to eliminate pretty much all waypoints other than a transport unload and it seemed to work flawlessly. As big_wilk mentioned, the chopper did seem to want to rotate a bit as it hovered, but this wasn't an issue at all since it still remained in place and the rotation was very subtle and slow...if worse came to worse, someone may get knocked down in the process, but far better than having people injured and killed. Furthermore, it seemed to work just fine with either the 'Transport Unload' command or just telling the chopper to 'land "GET IN"', then ordering troops to disembark.

I feel this is the exact solution that I was hoping for as I've been able to clean up my landings and use less coding in the process. Granted, I feel like an idiot for over-complicating something that turned out to be so simple...but that's what these forums are for. And this knowledge shall help greatly with future incursions with this problem.

Thank you all again for your incredible help, as I think this issue has been solved. Topic can be locked if necessary, since I believe we have reached the conclusion I was searching for. Hopefully now, I can continue with trying to get this campaign finished without worrying about simple little things that could prove to be mission-breakers. You guys are the best.

*LAST UPDATE* Changing the helipad init to this, 'this setpos (this modeltoworld [0,0,-0.1])', (note the -0.1 at the end) causes the chopper to land COMPLETELY, so then there is no rotation and no movement until everyone is offloaded. This may not be useful for steep slopes, as you wouldn't want to land entirely, but for a slight slope, this will allow the chopper to land without skidding or sliding while unloading.

This post was edited by Siege-A (2013-12-21 18:46, ago)

UnderSiege Productionz

Author Message


Posts: 1484
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#10 Posted at 2013-12-21 20:18        
     
In the past when I used negative values I found I couldn't order units to enter the chopper, I can't remember though if I was doing it exactly like it is above, it may have been negative velocity.


Author Message


Posts: 95
Rank:


Level: Member

Country: us
Location: North Carolina
Occupation: Mission Dev.
Age: 34
In-game name: Siege-A

 
#11 Posted at 2013-12-21 21:00        
     
Haven't tried that yet F2k, but I'll hop right on it and check. While I use the negative value in this particular situation, I don't think I would ever use it when doing an extraction or loading troops, as I don't have much trouble getting a helo to land and wait while people board. It seems the only time I have ever had issues with the choppers is when they are unloading troops, as in this scenario posted, sometimes the choppers like to correct themselves as units are getting out. It seems like when a chopper lands awaiting troops to load, it lands completely...whereas a chopper that lands to disembark troops, hovers just barely (hardly noticeable) over the ground.

Thanks for the input as always, and I will update after I have tested what you mentioned.

*UPDATE* I have tested both with player as leader and following AI, as well as loading and disembarking from the chopper and had no issues at all. Seems the negative value in this situation had no effect on being able to enter or exit the helicopter. So, all seems good...for now.

This post was edited by Siege-A (2013-12-21 21:23, ago)

UnderSiege Productionz