i want to make a projectile destroy itself after it has traveled a set distance(bullet_range)
if distance_to_point(point_of_creationx,point_of_creationy)>=bullet_range
{instance_destroy()}
how do i get the point it was created at?
also i use this to get the caracter to face in the right direction:
in step event:
if direction>337.5 or direction<22.5
{pd=0}
{if direction>22.5 and direction<67.5
pd=1}
{if direction>67.5 and direction<112.5
pd=2}
{if direction>112.5 and direction<157.5
pd=3}
{if direction>157.5.5 and direction<202.5
pd=4}
{if direction>202.5 and direction<247.5
pd=5}
{if direction>247.5 and direction<292.5
pd=6}
{if direction>292.5 and direction<337.5
pd=7}
in draw event:
if pd=0
{draw_sprite(sprite9,0,x,y)}
if pd=1
{draw_sprite(sprite10,0,x,y)}
if pd=2
{draw_sprite(sprite11,0,x,y)}
if pd=3
{draw_sprite(sprite12,0,x,y)}
if pd=4
{draw_sprite(sprite13,0,x,y)}
if pd=5
{draw_sprite(sprite14,0,x,y)}
if pd=6
{draw_sprite(sprite15,0,x,y)}
if pd=7
{draw_sprite(sprite8,0,x,y)}
but when the character stops moing it changes back to the starting sprite.
how do i get it to stay on the last used sprite?
my minimap is also acting weird
i use this:
draw_set_alpha(0.45)
draw_set_color(c_black)
draw_rectangle(view_xview + 5, view_yview + 60, view_xview + 110, view_yview + 160, 0);
draw_set_color(c_red)
draw_circle(Player.x/(room_width/200)+view_xview, Player.y/(room_height/100)+view_xview,5,0)
how do i get the circle representing the player to stay on the minimap?
and thanks in advance
Pixel_Reaper











