for: the ship (the player) stop moving when it shot
the problem is wait(10) in your action moveplayer
add function playershoot
Code:
function playershoot ()
{
while (1)
{
if (key_space == on) // press and hold the "Space" key to move
{
snd_play(onesh, 100, 0);
you=ent_create(Shoot_tga,vector(my.x+40,my.y,my.z),shoot_me);
you.passable=off;
wait (10);
}
wait(1);
}
}
action moveplayer
{
my.enable_entity=on;
my.event = Touch_me;
player = me;
my.push=1;
my.polygon=on;
playershoot();
while (1)
{ c_move (my, nullvector, vector(1, 0, 0), glide);
camera.x = my.x + 100;
// move the car using absolute_speed
if (key_cuu == on && my.y < 90) // press and hold the "Up" arrow key to move
{
c_move (my, nullvector, vector(0, 2, 0), glide);
}
if (key_cud == on && my.y > -90) // press and hold the "Down" arrow key
{
c_move (my, nullvector, vector(0, -2, 0), glide);
}
wait (1);
}
}
in your define panel
Code:
Panel Game_Over_Pan
{
bmap = "gameover.bmp";
pos_x=162;
pos_y=74;
button = 180, 150, neu_O_bmap, Neu_N_bmap, Neu_O_bmap, next_Game, null, null;
flags=refresh, overlay;
}
button is over size of bmap, resize your bmap (for example 500*500 pixels)
remove Game_Over_pan.visible=on; in spawn, spawn2 and spawn3, no needed this
for next level create and call them at end of level
Code:
function next_level()
{
die=1;
snd_play(start, 100, 0);
Game_next_Pan.visible = off;
wait(1);
level_load("level2.wmb");
wait (1);
mouse_mode=0;
}
I looked at your code quickly, but I think that there is still some improvements to make, look at excellent Planet Survivor of the magazine AUM
I can send you the corrected code, But in first work one little on your code, it's the best way of learning