Jump to content


Photo

sprite angle


  • Please log in to reply
3 replies to this topic

#1 GreenhornGames

GreenhornGames

    GMC Member

  • GMC Member
  • 730 posts
  • Version:GM8

Posted 04 March 2012 - 02:46 PM

in this code, while obj_bullet is colliding with obj_target, it creates 2 bullets on target position each going opposite ways:

if colition_target=false
{
bul=instance_create(x,y,obj_bullet)
with (bul)
{
direction=other.direction+90
colition_target=true
}
bul=instance_create(x,y,obj_bullet)
with (bul)
{
direction=other.direction-90
colition_target=true
}
}

how do i make the obj_bullet sprite face that direction?
  • 0

#2 creativebunch

creativebunch

    The Bunchiest

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

Posted 04 March 2012 - 03:20 PM

image_angle = direction;

  • 0

#3 GreenhornGames

GreenhornGames

    GMC Member

  • GMC Member
  • 730 posts
  • Version:GM8

Posted 04 March 2012 - 03:46 PM

where do i put that?
  • 0

#4 creativebunch

creativebunch

    The Bunchiest

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

Posted 05 March 2012 - 10:10 AM

In the with statements after setting the direction.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users