#define shadow_create
oname=object_add()
global._shadow=argument0

object_event_add(oname,ev_create,0,
"
alarm[0]=1
_shadow=1
"
)

object_event_add(oname,ev_alarm,0,
"
_shadow-=1/global._shadow
if _shadow<=0
{
instance_destroy()
}
alarm[0]=1
"
)

object_event_add(oname,ev_draw,0,
"
draw_sprite_ext(sprite1,0,0,0,room_width,room_height,0,c_white,_shadow)
"
)

instance_create(0,0,oname)
#define shadow_end
oname=object_add()
global._shadow=argument0
global._shadow_room=argument1

object_event_add(oname,ev_create,0,
"
alarm[0]=1
_shadow=0
"
)

object_event_add(oname,ev_alarm,0,
"
_shadow+=1/global._shadow
if _shadow>=1
{
room_goto(global._shadow_room)
}
alarm[0]=1
"
)

object_event_add(oname,ev_draw,0,
"
draw_sprite_ext(sprite1,0,0,0,room_width,room_height,0,c_white,_shadow)
"
)

instance_create(0,0,oname)
