[/code]friction=0.2;
instance_create(x,y,tabanca);
d3d_start();
d3d_set_hidden(true);
d3d_set_lighting(false);
d3d_set_culling(false);
texture_set_interpolation(true);
height=0
pitch=0
stepe bu kod
direction -= (display_mouse_get_x() -display_get_width()/2)/10;
pitch += (display_mouse_get_y() -display_get_height()/2)/400;
display_mouse_set(display_get_width()/2,display_get_height()/2);
pitch = max(min(pitch,89),-89);
end stepe bu kod
global.camx=x;
global.camy=y;
global.camsin=sin(self.direction*pi/180);
global.camcos=cos(self.direction*pi/180);
a key yani sag tuşda olabilir a da
bu kod
var xn,yn,inst;
xn = x - sin(direction*pi/180);
yn = y - cos(direction*pi/180);
if not place_meeting(xn,yn,duvarlar)
{ x = xn; y = yn; }
else{
inst=place_meeting(xn,yn,duvarlar)
if (inst.height>self.height){
x = xn; y = yn; }
}
d tuşuna sü kod
var xn,yn,inst;
xn = x + sin(direction*pi/180);
yn = y + cos(direction*pi/180);
if not place_meeting(xn,yn,duvarlar)
{ x = xn; y = yn; }
else{
inst=place_meeting(xn,yn,duvarlar)
if (inst.height>self.height){
x = xn; y = yn; }
}
s ye şu kod
[code]
{
var maxspeed;
if keyboard_check(vk_shift) maxspeed = 3 else maxspeed = 3;
if (speed > -maxspeed) speed = max(-maxspeed,speed-0.4);
}
w ye su kod
{
var maxspeed;
if keyboard_check(vk_shift) maxspeed = 3 else maxspeed = 3;
if (speed < maxspeed ) speed = min(maxspeed ,speed+0.4);
}
drav a da su kod
//set the projection
d3d_set_projection(x,y,10+height+pitch,x+cos(direction*pi/180),y-sin(direction*pi/180),10+height,0,0,1);
d3d_draw_floor(0,0,0,room_width,room_height,0,background_get_texture(fc12),24,18);
wall1 h diye obje yukarı aşaga uzun olan siyah sprşteyi seçin
create e şu kod
x1=x;
x2=x;
y1=y-16;
y2=y+16;
z1=32;
z2=0;
height=22;
tex=background_get_texture(wall1);
şimdi wall1 v die obje
sag sola uzun olan sprite olsun olsun
şu kod create e
x1=x-16;
x2=x+16;
y1=y;
y2=y;
z1=32;
z2=0;
height=22;
tex=background_get_texture(wall1);
şimdi deneyelim bakalım nsl oldu
DEVAMI VAR