mam przyklad latarki ale jest problem bo kiedy ludzik ginie to latarka też się usuwa i wtedy wyskakuje błąd
___________________________________________
ERROR in
action number 1
of Step Event
for object oCiemnosc:
In script script_light:
Error in code at line 24:
//If there are no entries for lights then the engine won't run.if ds_list_empty(global.list) then exit//Set the blend mode to subtract.draw_set_blend_mode(bm_subtract)//Set the drawing target to our surface sur.surface_set_target(sur)//Clear the surface in the given color and alpha based on its respective arguments.draw_clear_alpha(argument0,argument1)//Initialize a for loop. This will loop through each block in our list of id's.for (i=0;i<ds_list_size(global.list);i+=1){ //Create a temporary variable 'object' and assign it to the instance at location i in the list. var object; object=ds_list_find_value(global.list,i) //Draw the light on the surface. with object draw_sprite_ext(sprite_index,0,x-view_xview[0],y-view_yview[0],image_xscale,image_yscale,direction,c_white,1) //Draw the light with color if set. if object.draw_color=true then { draw_set_blend_mode(bm_add) with object draw_sprite_ext(sprite_index,0,x-view_xview[0],y-view_yview[0],image_xscale,image_yscale,direction,image_blend,image_alpha) draw_set_blend_mode(bm_subtract) }}//Set the drawing target back to the screen.surface_reset_target()//Set the blend mode back to normal.draw_set_blend_mode(bm_normal)
^
at position 15: Unknown variable draw_color
link do pliku
na moje to wszystko dlatego że otwiera listę i potem nie wie co z nią zrobić
global.list
pomożecie???