Jump to content


Photo

3d minimap to Player direction


  • Please log in to reply
2 replies to this topic

#1 kaibil

kaibil

    GMC Member

  • GMC Member
  • 119 posts
  • Version:GM8

Posted 09 June 2012 - 08:27 PM

I have this code:

//arg0 to Player
//arg1 sprite

 
   DISTANCE_x =  argument0.x - x;
    DISTANCE_y =  argument0.y - y;
    if DISTANCE_x*DISTANCE_x + DISTANCE_y*DISTANCE_y < 250000
    {
       //draw_circle_color(display_get_width()/2 + DISTANCE_x/5,display_get_height()/2 + DISTANCE_y/5,4,c_red,c_red,0);
       draw_sprite_ext(argument1,0,display_get_width()/2 + DISTANCE_x/5,display_get_height()/2 + DISTANCE_y/5,image_xscale,image_yscale,direction,image_blend,1)
    }

how would I make it draw in direction of Player's direction?
  • 0

#2 Phantom107

Phantom107

    Engineer

  • GMC Member
  • 2599 posts
  • Version:GM:Studio

Posted 10 June 2012 - 08:42 AM

argument0.direction in the direction argument?
  • 0

#3 kaibil

kaibil

    GMC Member

  • GMC Member
  • 119 posts
  • Version:GM8

Posted 10 June 2012 - 09:20 PM

argument0.direction in the direction argument?


that direction has no arg0 because it's to draw the sprite's direction... anyways, im using a parametrical equation to achieve this now.

Edited by kaibil, 10 June 2012 - 09:20 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users