level 8
逐光Dream
楼主
代码是在User Event 2 里执行:
if ( a_dir >= 45 and a_dir < 90)
{sprite_index = p_d_atk1_1}
if (a_dir >= 0 and a_dir < 45)
{sprite_index = p_d_atk1_2 }
if (a_dir >= 315 and a_dir < 360)
{sprite_index = p_d_atk1_3 }
if (a_dir >=270 and a_dir < 315)
{sprite_index = p_d_atk1_4 }
if ( a_dir >= 90 and a_dir < 135)
{sprite_index = p_d_atk1_1}
if (a_dir >= 135 and a_dir < 180)
{sprite_index = p_d_atk1_2}
if (a_dir >= 180 and a_dir < 225)
{sprite_index = p_d_atk1_3}
if (a_dir >= 225 and a_dir < 270)
{sprite_index = p_d_atk1_4}
if (image_index == 2 ) {
instance_create_layer(x,y,"instances_3",o_jianqi)
}
但是image_index == 2却不会执行instance_create_layer(x,y,"instances_3",o_jianqi)
求大佬解决!
2018年07月15日 03点07分
1
if ( a_dir >= 45 and a_dir < 90)
{sprite_index = p_d_atk1_1}
if (a_dir >= 0 and a_dir < 45)
{sprite_index = p_d_atk1_2 }
if (a_dir >= 315 and a_dir < 360)
{sprite_index = p_d_atk1_3 }
if (a_dir >=270 and a_dir < 315)
{sprite_index = p_d_atk1_4 }
if ( a_dir >= 90 and a_dir < 135)
{sprite_index = p_d_atk1_1}
if (a_dir >= 135 and a_dir < 180)
{sprite_index = p_d_atk1_2}
if (a_dir >= 180 and a_dir < 225)
{sprite_index = p_d_atk1_3}
if (a_dir >= 225 and a_dir < 270)
{sprite_index = p_d_atk1_4}
if (image_index == 2 ) {
instance_create_layer(x,y,"instances_3",o_jianqi)
}
但是image_index == 2却不会执行instance_create_layer(x,y,"instances_3",o_jianqi)
求大佬解决!