//Create event
surface_light=surface_create(800,600)
global.light_define=true
//End step
if global.light_define=true
{
surface_set_target(surface_light)
draw_clear_alpha(0,0)
draw_set_color(c_black)
for ( i = 0; i < instance_number(obj_block); i += 1 )
{
object = instance_find(obj_block, i )
if instance_exists( object )
{
if position_meeting( object.x, object.y - 32,obj_block)
{
draw_set_alpha(0.6)
draw_rectangle( object.x, object.y, object.x + 31, view_yview + view_hview, 0 )
draw_set_alpha(1)
}
}
}
surface_reset_target()
}
//Draw event
draw_surface(surface_light,view_xview[0],view_yview[0])
- Game Maker Community
- → Viewing Profile: Topics: lester3857
lester3857
Member Since 04 Dec 2010Offline Last Active Yesterday, 10:12 PM
Community Stats
- Group New Member
- Active Posts 14
- Profile Views 1443
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
Topics I've Started
Surface Help
06 July 2012 - 07:42 PM
I want to make the surface area of 800x600 but to follow the camera, EG: xview_xview [0], ect ... the surface is drawn in "draw_surface (surface_name, view_xview [0], view_yvieW [0], etc)." The room is 4000x2000 but even if the surface is drawn on the camera are only 800x600 the room ..... HELP!
Rare Alpha problem!
05 July 2012 - 08:42 PM
Can any help me?
The 2 sprites are drawn on the transparency of 0.7- Why? First draw it's on 1 and then on 0.7 alpha
I check the surface drawing alpha and image_alpha but dont work!
Please help me! Only happends on Surface!
surface_set_target(surface)//Set drawin surface
draw_clear_alpha(0,0); //Clear screen errors
with(xdat2_all_parent)//Choose Objects
{
//if not position_meeting(x,y-32,xdat2_all_parent)
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,c_white,1)
draw_sprite_ext(sprite_index,image_index,x,y,image_xscale,image_yscale,image_angle,c_black,.7)
}
surface_reset_target()//restore surface to screenThe 2 sprites are drawn on the transparency of 0.7- Why? First draw it's on 1 and then on 0.7 alpha
I check the surface drawing alpha and image_alpha but dont work!
Please help me! Only happends on Surface!
Help
19 January 2012 - 03:31 PM
create event//
//Create by Lester
//Define variables
alpha=0
alpha_temp = 0
for(i=0;i<5;i+=1)
{
if place_meeting(x,y-1-(i*32),obj_block)
{alpha+=2;}
}
//Up alpha
global.render=true
/Draw event
//Check Distance
if global.render=true
{
distance=128
if distance_to_object(instance_nearest(x,y,obj_torch))<distance
{
object=instance_nearest(x,y,obj_torch)
alpha2=distance_to_object(object)/distance
}
else
alpha2=1;
alpha_temp = alpha
if alpha2 < alpha_temp
alpha_temp=alpha2
}
ERROR in atcion number 1
unkonown variable alpha
//Create by Lester
//Define variables
alpha=0
alpha_temp = 0
for(i=0;i<5;i+=1)
{
if place_meeting(x,y-1-(i*32),obj_block)
{alpha+=2;}
}
//Up alpha
global.render=true
/Draw event
//Check Distance
if global.render=true
{
distance=128
if distance_to_object(instance_nearest(x,y,obj_torch))<distance
{
object=instance_nearest(x,y,obj_torch)
alpha2=distance_to_object(object)/distance
}
else
alpha2=1;
alpha_temp = alpha
if alpha2 < alpha_temp
alpha_temp=alpha2
}
ERROR in atcion number 1
unkonown variable alpha
draw_sprite_part () HELP! MEE
05 June 2011 - 11:44 PM
SORRY FOR MY BAD English
Hi, I need the code for draw part of the sprite
I need is to make the button of the windows 7 taskbar
Hi, I need the code for draw part of the sprite
I need is to make the button of the windows 7 taskbar
Windows Drag n drop
30 May 2011 - 02:25 PM
hello, need his help in my simulación of windows 7
say me the code to drag windows

help me!!!
say me the code to drag windows

help me!!!
- Game Maker Community
- → Viewing Profile: Topics: lester3857
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content