HEY O.o this is my video from youtube
i try to made an egoshooter with div2,too
it was very hard to find out,how you make an collision in Mode8
since i was 12 !!!
now ive find a why for this problem. it was from the file (wsportX) in "process rampa" ...
here my test shooter that i make
- Code: Select all
//////item in 3d world with collision////
////// for DIV2 ////
PROGRAM shooter;
CONST
item_pos=15000;
item_x=15000;
item_y=15000;
item_quant=100;
GLOBAL
shot_pos_x;
shot_pos_y;
munition=0;
file1;
file2;
BEGIN
set_mode(m640x480);
set_fps(70,0);
load_fpg("shooter.fpg)
file2=load_fpg("hud.fpg");
load_wld("level1",0);
////
///
start_mode8(id,0,0);
ctype=c_m8;
hight=64;
radius=64
m8.hight=32;
go_to_flag(1);
////
item();
loop
x=shot_pos_x;
y=shot_pos_y;
if(key(_esc)) exit("",0)end
...
frame;
end
end
process shot()
begin
file=file2;
ctype=c_m8; // shot goes in 3d world
graph=14;
x=shot_pos_x; // shot comes from player view
y=shot_pos_y;
repeat
advance(15);
until(munition==0);
end
end
process item()
begin
file=file2;
cytpe=c_m8;
graph=15;
x=item_x;
y=item_y;
REPEAT
if(fahter.x=>item_x-item_quant and father.x<=item_pos+item_quant and
father.y=>item_pos-150 and father.y<=item_pos)
draw_gun();
munition=munition+5;
break;
end
UNTIL(y==200);
END
...
process draw_gun()
begin
file=file2;
graph=13;
repeat
if(key(_space and munition<=0)
shot();
//munition--;
until(munition==0);
try it and have fun ... maybe there are some errors but you know what i mean
