V
VansiusProductions
Guest
Hi guys,
I have an object called obj_circle.
Its parent is an object called obj_parent.
It has a draw event that has a code:
Then I have an object called obj_global, it doesn't interact with other objects. It sets global.scale when the room starts. Also, I have 2 events mouse wheel up and down. For mouse wheel up I have a code:
The script scr_render is as follows:
It redraws all the objects according to global.scale.
Basically when you scroll your mouse, the objects get smaller or bigger, depending on global.scale.
However everytime I do that the objects get flashy and sometimes it zooms in and out like inverted. This system is probably not the best and I would appreciated if anyone can help me.
I have an object called obj_circle.
Its parent is an object called obj_parent.
It has a draw event that has a code:
Code:
draw_set_colour(c_white)
draw_set_font(font)
draw_set_halign(fa_center)
draw_sprite_ext(sprite_index,image_index,x,y,global.scale*diameter/sprite_width,global.scale*diameter/sprite_height,image_angle,c_white,1)
draw_text(x,y+sprite_height/2+18,string(name) + "#" + string(diameter) + string(unit))
Code:
global.scale += 5
with (obj_parent) scr_render()
Code:
image_xscale = global.scale*diameter/sprite_width
image_yscale = global.scale*diameter/sprite_height
draw_sprite_ext(sprite_index,image_index,x,y,global.scale*diameter/sprite_width,global.scale*diameter/sprite_height,image_angle,c_white,1)
Basically when you scroll your mouse, the objects get smaller or bigger, depending on global.scale.
However everytime I do that the objects get flashy and sometimes it zooms in and out like inverted. This system is probably not the best and I would appreciated if anyone can help me.