View Single Post
Old 11-08-2012, 12:46 PM   PM User | #31
salutsalut
New to the CF scene

 
Join Date: Nov 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
salutsalut is an unknown quantity at this point
I have found this

Code:
with instance_create(
    x+lengthdir_x(80,image_angle),
    y+lengthdir_y(80,image_angle),obj_bullet)
{
 xspeed=lengthdir_x(10,other.image_angle)
 yspeed=lengthdir_y(10,other.image_angle)
}
or this one

Code:
with instance_create(
    x+lengthdir_x(80,image_angle),
    y+lengthdir_y(80,image_angle),obj_bullet)
{
 xspeed=cos(other.image_angle*pi/180)*10     //convert degrees to radians when using these
 yspeed=-sin(degtorad(other.image_angle))*10 //i think the y component needs to be flipped
}
but I can't match it with your code.
salutsalut is offline   Reply With Quote