J
Joshua Hotchin
Guest
Hey,
the code is here:
(In "press <Space>" Event)
When I start the game and press space, nothing happens even though playerdir is set to 1 (right). If I press "W" and then space it shoots upwards (which it is meant to do) but when I press "D" (right) and then press space no bullets come out.
BTW WASD are movement keys. Just in case.
the code is here:
(In "press <Space>" Event)
Code:
/// Spawn the bullets
if playerdir = 0 {
if powerup_bulletsize = 4 instance_create(x+2, y+4, obj_bullet4x4_up) else
if powerup_bulletsize = 8 instance_create(x+2, y+4, obj_bullet8x8_up) else
if powerup_bulletsize = 16 instance_create(x+2, y+4, obj_bullet16x16_up) else
if playerdir = 1 {
if powerup_bulletsize = 4 instance_create(x+2, y+4, obj_bullet4x4_right) else
if powerup_bulletsize = 8 instance_create(x+2, y+4, obj_bullet8x8_right) else
if powerup_bulletsize = 16 instance_create(x+2, y+4, obj_bullet16x16_right) else
if playerdir = 2 {
if powerup_bulletsize = 4 instance_create(x+2, y+4, obj_bullet4x4_down) else
if powerup_bulletsize = 8 instance_create(x+2, y+4, obj_bullet8x8_down) else
if powerup_bulletsize = 16 instance_create(x+2, y+4, obj_bullet16x16_down) else
if playerdir = 3 {
if powerup_bulletsize = 4 instance_create(x+2, y+4, obj_bullet4x4_left) else
if powerup_bulletsize = 8 instance_create(x+2, y+4, obj_bullet8x8_left) else
if powerup_bulletsize = 16 instance_create(x+2, y+4, obj_bullet16x16_left)
}}}}
BTW WASD are movement keys. Just in case.