Sedgwick2K
Member
GML:
///Shooting
if (shoot > 0)
shoot--
if (mouse_check_button_pressed(mb_left) && !shoot)
{
with(obj_gun)
{
image_index = 0;
image_speed = 0.5;
}
audio_play_sound(snd_pistol, 1, false)
shoot = 10
var bullet = instance_create(x, y, obj_bullet)
bullet.z = player_height //This line gives me "Unexcepted symbol in expression" error
bullet.xto = xto - x
bullet.yto = yto - y
bullet.zto = zto - player_height
bullet.damage = 20
}
GML:
z = 0
xto = 0
yto = 0
zto = 0
damage = 0
//These are variables assigned on obj_bullet Create event.
Last edited: