I need help fixing this code. the problem I have is that If holding down the right pad first and then holding down the left pad Im unable to control my character. the left pad controls the movement. the right pad shoots. You can compare my main character to a tank.
Anyone know what to fix in this code. if so please help. I am will to pay if needed but I need it to be perfect.
if device_mouse_check_button(0,mb_left) || device_mouse_check_button(1,mb_left){
//movement
if device_mouse_x(0)>view_xview[0]+20 && device_mouse_x(0)<view_xview[0]+100{
if device_mouse_y(0)>view_yview[0]+160 && device_mouse_y(0)<view_yview[0]+240{
moving1=1
}}else{
moving1=0
}
if device_mouse_x(1)>view_xview[0]+20 && device_mouse_x(1)<view_xview[0]+100{
if device_mouse_y(1)>view_yview[0]+160 && device_mouse_y(1)<view_yview[0]+240{
moving2=1
}}else{
moving2=0
}
//SHOOTING
if device_mouse_x(0)>view_xview[0]+300 && device_mouse_x(0)<view_xview[0]+380{
if device_mouse_y(0)>view_yview[0]+160 && device_mouse_y(0)<view_yview[0]+240{
bodyrot=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(0),device_mouse_y(0))
if bulletout=0{
bulletout=1
alarm[0]=system.bulletspeed
sparkout=instance_create(x,y,obj_sparks)
sparkout.image_angle=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(0),device_mouse_y(0))
out=instance_create(x,y,obj_bullet)
out.direction=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(0),device_mouse_y(0))
out.image_angle=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(0),device_mouse_y(0))
out.speed=10
}
}}
if device_mouse_check_button(1,mb_left){
if device_mouse_x(1)>view_xview[0]+300 && device_mouse_x(1)<view_xview[0]+380{
if device_mouse_y(1)>view_yview[0]+160 && device_mouse_y(1)<view_yview[0]+240{
bodyrot=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(1),device_mouse_y(1))
if bulletout=0{
bulletout=1
alarm[0]=system.bulletspeed
sparkout=instance_create(x,y,obj_sparks)
sparkout.image_angle=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(1),device_mouse_y(1))
out=instance_create(x,y,obj_bullet)
out.direction=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(1),device_mouse_y(1))
out.image_angle=point_direction(view_xview[0]+348,view_yview[0]+192,device_mouse_x(1),device_mouse_y(1))
out.speed=10
}}}
}
}
////
////
////
////
if moving1=1{
direction=point_direction(view_xview[0]+52,view_yview[0]+192,device_mouse_x(0),device_mouse_y(0))
speed=system.movespeed
}
if moving2=1{
direction=point_direction(view_xview[0]+52,view_yview[0]+192,device_mouse_x(1),device_mouse_y(1))
speed=system.movespeed
}
if moving1=0 && moving2=0{
speed=0
}



Find content
Male



