Draw order for 2D elements in objects - GDL question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-01-02 09:19 PM - last edited on ‎2025-01-03 05:24 AM by Barry Kelly
I am having trouble with an object that I've created that I haven't encountered before. For some reason, the 2D elements are not being drawn in the correct order. I tried using the DRAWINDEX command, which worked, but it caused other issues when being called up in the script of another object. From what I understand, 2D elements are usually drawn in the order that they are scripted. I.e., if I have lines of three different pens, the first pen used should be drawn at the bottom and the last pen used should be drawn at the top. This has worked for a number of other 2D objects I have created, but for some reason in this object the lines all overlap in random ways. Is there a way to fix this without using the DRAWINDEX command? The .gsm file for the object is attached below.
Operating system used: Mac Apple Silicon
Solved! Go to Solution.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-01-03
01:57 PM
- last edited on
‎2025-01-04
01:29 AM
by
Laszlo Nagy
The drawing order kind of depends on the order of the commands – but only kind of. There are still some internal rules that should be drawn upon what.
But! If you do not want to use draw index you can force the order with this button in the compatibility options: (sorry for German screenshot)
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-01-03
01:57 PM
- last edited on
‎2025-01-04
01:29 AM
by
Laszlo Nagy
The drawing order kind of depends on the order of the commands – but only kind of. There are still some internal rules that should be drawn upon what.
But! If you do not want to use draw index you can force the order with this button in the compatibility options: (sorry for German screenshot)
POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-01-06 04:06 PM
That did it, thank you! I figured there was some setting I was missing.