ENO Posted May 20, 2013 Posted May 20, 2013 Sorry guys- very simple: Have a trigger for a huey landing at a height less than: and wondering if that's AGL or MSL. And at that rate- what is a sufficient "lower than" number- 2 meters above GL? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Taproot Posted May 20, 2013 Posted May 20, 2013 I think it is MSL. But tbh Im not sure what the numbers are measuring.. I dont think it is feet. I have a trigger that start on the number 33 in the triggers menu. What happends when the aircraft is "33" above it starts some music. However, the music does start the second I take off from the airstrip. If I use the number "32" the music started when I entered the aircraft, so that was to low.. [sIGPIC][/sIGPIC]
Robert1983NL Posted May 20, 2013 Posted May 20, 2013 For your information, HEIGHT is ALWAYS AGL. Altitude is MSL. But I think it's not correctly used in DCS.
ENO Posted May 20, 2013 Author Posted May 20, 2013 (edited) Guess I'll have to test it :) I'll confirm in a few minutes... Of course while I'm doing this I see that the aircraft altitude is in feet but if memory serves the "unit lower than" is measured in meters. WHY?! :doh: Edited May 20, 2013 by ENO "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
ENO Posted May 20, 2013 Author Posted May 20, 2013 Okay, so basically what I did was I set up an aircraft to start at 1100 feet over the ocean and set a waypoint at 100 feet so it would gradually descend. I set up a few triggers for "unit height less than" 300(m) / 200(m) / 100(m) 10 (m) and had it broadcast a message once it reached each height. Over the ocean it broadcast each message (I don't think the AI likes flying less than 100 feet unless landing so it didn't give me the 10m notice. Over the terrain and heights around 6-800 feet (*or more) I only got the 1 trigger for less than 300 meters. So what this tells me is that the unit lower than is in fact MSL in meters. While the height of the ME is in feet above either or. This is a real PITA now especially if you're interested in setting up "group activates" around your Huey- you need to know where someone is going to land so that you can go "lower than" and speed lower than... 1 M/S is about 3kph (btw). "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Grimes Posted May 20, 2013 Posted May 20, 2013 Once> Unit inside Zone and Expression>Do your action for the aircraft being landed Copy and paste this into expression: if Unit.getByName('unitName'):inAir() == false then return true end That expression is basically the same as a trigger that would be "Unit is on the ground" The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
ENO Posted May 21, 2013 Author Posted May 21, 2013 That's MUCH easier than having to figure out the height around where guys can land. Thanks! "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Fuby Posted May 21, 2013 Posted May 21, 2013 (edited) Once> Unit inside Zone and Expression>Do your action for the aircraft being landed Copy and paste this into expression: if Unit.getByName('unitName'):inAir() == false then return true end That expression is basically the same as a trigger that would be "Unit is on the ground" Hmm...added that .. and get a nil value error when entering the zone from it.. did a once, then unit present and expression above, then action to just send a message.. remove expression and the message passes fine on zone entrance.. what did I do wrong? . Edited May 21, 2013 by Fuby Games-Survival.com
Fuzzy_bear Posted May 21, 2013 Posted May 21, 2013 to figure out the msl all you need to do is place you cursor anywhere on the ME map and it tells you what the msl is along with the lat and long of that point. It displays on the bottom information bar at the base of the screen. I used three conditions: 1)altitude less than,if alt is stated for that area as 200 i made it 205 2)speed less than 2,if you have wind at ground lvl of 5m/s obviously add the minimum speed to that 3)unit pitch limit, a possitive of 5 and a negative of 5 for if the ground you land on is sloped. that way you have to meet all three conditions before the action becomes "true"
ENO Posted May 21, 2013 Author Posted May 21, 2013 to figure out the msl all you need to do is place you cursor anywhere on the ME map and it tells you what the msl is along with the lat and long of that point. It displays on the bottom information bar at the base of the screen. Yes and generally this is good enough to get you close- however as I'm quickly learning is few people (now) are good at landing the huey with pinpoint accuracy and heights can vary around terrain. Granted, if terrain is undulating so much that I couldn't get height within a couple of meters- they're not going to land there anyway. Further, if you have multiple landing points this script does (if we can get it working) prevent you from having to go scroll around various areas looking for high points in terrain to go "unit lower than." "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
ENO Posted May 21, 2013 Author Posted May 21, 2013 Hmm...added that .. and get a nil value error when entering the zone from it.. Basically did the same- left it exactly as is... also tried entering the actual unit name (didn't know I had to add the zone- that the other empty ()? (I'm code simple) "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Grimes Posted May 21, 2013 Posted May 21, 2013 Yes the () is required as that is a function call. Otherwise it is basically checking for the variable "inAir" (which probably doesn't exist) and if it equals false. Thus an error will occur, "can't compare a nil value" probably. There is more than one way to use the inAir() function. Unit.getByName('unitsName'):inAir() Unit.inAir(Unit.getByName('unitsName') local newUnit = Unit.getByName('unitsName') newUnit:inAir() Attached is a working example of what I described how to do it in my first post in the thread.land_test.miz The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Fuby Posted May 22, 2013 Posted May 22, 2013 well silly me.. the 'unitsname' was the actual name.. I thought it was part of expression when mentioned copy paste.. Now..with the right name of the UNIT in there it worked.. But.. if the pilot (my great flying skills) crashes within the trigger area instead of landing..it gives the nil error once again.. Games-Survival.com
Recommended Posts