=NOSIG=Ask Posted May 18, 2022 Posted May 18, 2022 I'm scripting missions and currently I need to have predefined areas for placing units because of the ground level. If not the units can end up either in the air or below the ground. Is there a way to automatically place units at ground level? Alternatively, would it be possible from the map mesh to see ground level?
LLv34_Temuri Posted May 19, 2022 Posted May 19, 2022 23 hours ago, [NOSIG]Ask said: I'm scripting missions and currently I need to have predefined areas for placing units because of the ground level. If not the units can end up either in the air or below the ground. Is there a way to automatically place units at ground level? Alternatively, would it be possible from the map mesh to see ground level? Blocks, AAA, and vehicles will be put to ground level automatically. Grounds, fires, smokes etc. you'll need to place to ground level manually or somehow map the heights when using scripting.
=NOSIG=Ask Posted May 19, 2022 Author Posted May 19, 2022 Thanks. Yeah, it's a problem but I think you helped me anyway. I can pre-define areas where I know the height but I'll try to figure a better way out. Honestly, if you omit the YPos it would be nice if it was placed on the ground automatically and if an air-going vessel with not started or parked it should also be on the ground no matter what.
=NOSIG=Ask Posted May 19, 2022 Author Posted May 19, 2022 (edited) I fixed 16k+ 160k+ height measurements. I'll have to test and see if I can calculate the height in between or I need to go more granular. Edited May 20, 2022 by [NOSIG]Ask Wrong number
Thad Posted May 20, 2022 Posted May 20, 2022 (edited) Salutations, In the editor there is a 'set on ground' button. Edited May 20, 2022 by Thad
=NOSIG=Ask Posted May 20, 2022 Author Posted May 20, 2022 (edited) Thanks, I know. But not when you're scripting. The plane altitude in the image is calculated from the nearest points. It's not granular enough. I'll have to split it up. The editor gets very sluggish with 160k objects added. Still impressed that it actually works well once it's had it's time to think. Edited May 20, 2022 by [NOSIG]Ask 1
AEthelraedUnraed Posted May 20, 2022 Posted May 20, 2022 (edited) I thought objects are automatically placed at ground level when you compile the mission? Anyhow, I recall seeing the heightmaps of one of the maps. I'll see if I can find where I found them. Edited May 20, 2022 by AEthelraedUnraed 1
=NOSIG=Ask Posted May 20, 2022 Author Posted May 20, 2022 If you can find it that would be great but otherwise I think I'm good. It's pretty flat around the airports and cities. I'm I tried to use the MissionResaver.exe but it seems like it only does it when placing them using the editor unfortunately.
AEthelraedUnraed Posted May 20, 2022 Posted May 20, 2022 Found it, it's an old editor functionality that was removed in one of the latest editor versions. A previous version of the Editor had a function Height -> Export RAW. It was removed a while back though for us normal users, since the height maps are locked anyhow. Anyway, all units except effects, "Grounds" objects and aircraft that start "In Air" should be moved to ground level at mission start. So the Messerschmitt in the picture you posted isn't a problem; it'll be fine if you load the mission
=NOSIG=Ask Posted May 20, 2022 Author Posted May 20, 2022 1 hour ago, AEthelraedUnraed said: Anyway, all units except effects, "Grounds" objects and aircraft that start "In Air" should be moved to ground level at mission start. So the Messerschmitt in the picture you posted isn't a problem; it'll be fine if you load the mission That's great and I'll test but did you mean what you wrote that "In Air" should be moved to ground level at mission start?
AEthelraedUnraed Posted May 20, 2022 Posted May 20, 2022 (edited) 14 minutes ago, [NOSIG]Ask said: That's great and I'll test but did you mean what you wrote that "In Air" should be moved to ground level at mission start? You can add airplanes to the mission file in three possible ways: - "In Air": the aircraft starts at the altitude set in the editor/mission file, with engines running, at speed. - "On Runway": the aircraft starts at ground level irrespective of what its altitude is in the editor/mission file, with engines running, stationary. - "On Parking": the aircraft starts at ground level irrespective of what its altitude is in the editor/mission file, with engines off, stationary. EDIT: since you're scripting, this is the "StartInAir" property. Its value is respectively 0, 1 or 2 for "In Air", "On Runway" and "On Parking". Edited May 20, 2022 by AEthelraedUnraed 1
=NOSIG=Ask Posted May 20, 2022 Author Posted May 20, 2022 I see what you wrote now, sorry. Thanks very much for that information. Really good news. It must have been fairly recent since I'm pretty sure I've been able to create flying boats and planes with the undercarriage in the ground not too long ago. Anyway, I can confirm that it works. Both the barracks, plane and the boat where placed 150 above ground level and loading the mission they are both firmly placed on the ground. Obviously I don't need the height map anymore 1
JG4_Deciman Posted May 26, 2022 Posted May 26, 2022 On 5/20/2022 at 5:12 PM, [NOSIG]Ask said: Anyway, I can confirm that it works. Both the barracks, plane and the boat where placed 150 above ground level and loading the mission they are both firmly placed on the ground. Obviously I don't need the height map anymore Hmmm, Yes AND No... For further scripting (b.E. placing effects over an Object) you must be able to rely on the object is placed on the ground... And even if the object is placed on the ground when starting the mission (visible part) the object is placed at the 'given' altitude inside the mission file. And AFAIK this is NOT corrected on resaving a mission... You can simply test and - either confirm that I am right - or proove that I am wrong... Place an object by your script setting the altitude far above ground. Resave the mission Place an additional effect by your script using the altitude settings read from the mission file (and that are the only positions scripts can read) and check where this effect is places (altitude) Deci
=NOSIG=Ask Posted May 31, 2022 Author Posted May 31, 2022 Hey Deci, That's awesome to know. I'll try it out later because I will add effects for sure. I don't know if it's the resaver that puts them on the ground though. I think it's the actual game that puts them on the ground. My mission file had the objects at 150m in the editor but then on the ground in the game. /K
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now