T
TLeM0
Guest
Hi!
I have been recently trying on doing a FPS test on a 3D room with multiple lights inside. I placed about 20 lights in the room, but when I launch the game, only 1 light works and all the the other walls that were supposed to be lit, aren't.
Here is are some information from objects that include code for lighting:
I'm looking forward to solutions!
I have been recently trying on doing a FPS test on a 3D room with multiple lights inside. I placed about 20 lights in the room, but when I launch the game, only 1 light works and all the the other walls that were supposed to be lit, aren't.
Here is are some information from objects that include code for lighting:
Code:
Information about object: obj
Sprite: sprite0
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:
d3d_start();
d3d_set_lighting(true)
d3d_set_hidden(true)
d3d_set_perspective(true)
d3d_set_shading(true)
d3d_set_culling(false)
zdir = 0
display_mouse_set(display_get_width()/2,display_get_height()/2)
Step Event:
execute code:
speed = 0;
if keyboard_check(ord("W")){speed = 8}
if keyboard_check(ord("A")){x += lengthdir_x(8,direction+90) y += lengthdir_y(8,direction+90)}
if keyboard_check(ord("S")){speed = -6}
if keyboard_check(ord("D")){x += lengthdir_x(8,direction-90) y += lengthdir_y(8,direction-90)}
Draw Event:
execute code:
draw_set_color(c_white)
direction -= (display_mouse_get_x()-(display_get_width()/2))/10
zdir -= (display_mouse_get_y()-(display_get_height()/2))/4
display_mouse_set(display_get_width()/2,display_get_height()/2)
var camx, camy, camz;
camx = x+lengthdir_x(100,direction)
camy = y+lengthdir_y(100,direction)
camz = zdir
d3d_set_projection(x,y,100,camx,camy,camz,0,0,1)
Code:
Information about object: object4
Sprite: sprite4
Solid: false
Visible: true
Depth: -2
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Draw Event:
execute code:
d3d_light_define_point(1, x,y,1,2000,c_white)
d3d_light_enable(1, true)
Last edited by a moderator: