thank you for confirming the drawback...I will consider the line...Unfortunately there is no built-in way to do this. I looked to see if someone had a custom script for this and couldn't seem to find one. You could write one yourself without too much trouble using draw_line_width(x1, y1, x2, y2, w) which will draw a thick line.... you just need to draw 4 of them.
//drawRectangle(x1,y1,x2,y2,color,width)
x1 = argument0
y1 = argument1
x2 = argument2
y2 = argument3
color = argument4
width = argument5
draw_set_color(color)
draw_rectangle(x1,y1,x2,y2,true)
var i = 0
do
{
i += 1
draw_rectangle(x1-i,y1-i,x2+i,y2+i,true)
}
until(i = width)
Not too late for me!This is way too late, but I made a script to do this, may aswell put it here. Script works as follows:
drawRectangle(0,0,32,16,c_blue,16)
- Draws a blue rectangle, 32x16 in size, with outline that has width of 16 pixels, draws the outline thickness either from the edges outward.
Code:
GML://drawRectangle(x1,y1,x2,y2,color,width) x1 = argument0 y1 = argument1 x2 = argument2 y2 = argument3 color = argument4 width = argument5 draw_set_color(color) draw_rectangle(x1,y1,x2,y2,true) var i = 0 do { i += 1 draw_rectangle(x1-i,y1-i,x2+i,y2+i,true) } until(i = width)
Yup! Still years later helping out!!! Thanks.This is way too late, but I made a script to do this, may aswell put it here. Script works as follows:
drawRectangle(0,0,32,16,c_blue,16)
- Draws a blue rectangle, 32x16 in size, with outline that has width of 16 pixels, draws the outline thickness either from the edges outward.
Code:
GML://drawRectangle(x1,y1,x2,y2,color,width) x1 = argument0 y1 = argument1 x2 = argument2 y2 = argument3 color = argument4 width = argument5 draw_set_color(color) draw_rectangle(x1,y1,x2,y2,true) var i = 0 do { i += 1 draw_rectangle(x1-i,y1-i,x2+i,y2+i,true) } until(i = width)