Abdur Olajuwon
Member
I got some shooting in my game to work, but I was wonder how I can shoot at a certain angle with the gamepad. What I want to go for is for the left analog stick to be pointing at an angle(45 degree angle) while I shoot. This what I have for the shooting, but it shoots straight when the player runs.
GML:
if abs(gamepad_axis_value(0,gp_axislh)) && (gamepad_button_check(0,gp_face3)) && canShoot
{
canShoot = false
alarm[0] = shoot_delay
with (instance_create_layer(x,y,"BULLETS",obj_projectile))
{
direction = 0;
speed = 20;
}
}