Jump to content

trigger.action.markupToAll doesn't fill the area


Go to solution Solved by Flappie,

Recommended Posts

Posted

PG map.

area_to_show={
    [1] = { y = -540560.37869145, x = -127297.25695779,    },
    [2] = {    y = -524132.83228739, x = -127959.65802247,    },
    [3] = {    y = -525457.63441675, x = -161212.19146939,    },
    [4] = {    y = -541620.22039494, x = -160417.31019178,    }
}

trigger.action.markupToAll(1, -1, 7, area_to_show[1], area_to_show[2], area_to_show[3], area_to_show[4], {0, 0, 1, 1}, {0, 0, 1, 1}, 1)

 

On this one I get the outline of the area with a solid blue line, but no shading at all, whatever I do. Any ideas?

Posted

Hi. I tried  to copy-paste your code in a DO SCRIPT trigger action, but I don't see any drawing on the F10 map. No outline, not anything.

Could you please attach a .miz file?

 

---

Posted (edited)

My bad, sorry. Correctly.
 

area_to_show={
    [1] = { z = -540560.37869145, x = -127297.25695779, y=0    },
    [2] = { z = -524132.83228739, x = -127959.65802247, y=0   },
    [3] = { z = -525457.63441675, x = -161212.19146939, y=0   },
    [4] = { z = -541620.22039494, x = -160417.31019178, y=0   }
}

trigger.action.markupToAll(1, -1, 7, area_to_show[1], area_to_show[2], area_to_show[3], area_to_show[4], area_to_show[1], {0, 0, 1, 1}, {0, 0, 1, 1}, 1)

 

Look over Qatar.

linetest2.miz

Edited by Jagohu
  • Thanks 1
  • Solution
Posted

Thank you. You asked for a line (first parameter =1). Since lines have a null surface, there's nothing to paint. 😉

Replace "1" (line) by "6" (quad) or "7" (freeform) and it will work.

  • Thanks 1

---

Posted

Great call, thank you. Ouch, I mixed up the id which was supposed to be 1 with the type which was supposed to be free form, 7. Thank you very much for pointing it out!

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...