smashencoo
Member
So I just need a simple rope design where a rope sprite stretches from one object to another. I tried using the draw_sprite_general function so I could use the width and rotation to have it follow the objects:
var angle;
var distance;
distance = distance_to_object(obj_Buck_Plane);
angle = point_direction(x,y,obj_Buck_Plane.x,obj_Buck_Plane.y);
draw_sprite_general(spr_rope,1,x,y,distance,sprite_height,x,y,1,1,angle,c_white,c_white,c_white,c_white,1);
But the rope isn't drawing. It is in the draw event if you are wondering. I used x and y because the object with the code is where I want it to anchor. If you can fix this code or give me something else entirely that works, it doesn't matter, either way is fine. Basically I just want to stretch a sprite from one point to another, but also rotate it in the direction of the other object, and the draw_sprite_stretched function doesn't have a rotation option. I imagine there must be a much simpler way that I don't know about. Knowing this will help a lot with all my future projects as well. Thanks.
var angle;
var distance;
distance = distance_to_object(obj_Buck_Plane);
angle = point_direction(x,y,obj_Buck_Plane.x,obj_Buck_Plane.y);
draw_sprite_general(spr_rope,1,x,y,distance,sprite_height,x,y,1,1,angle,c_white,c_white,c_white,c_white,1);
But the rope isn't drawing. It is in the draw event if you are wondering. I used x and y because the object with the code is where I want it to anchor. If you can fix this code or give me something else entirely that works, it doesn't matter, either way is fine. Basically I just want to stretch a sprite from one point to another, but also rotate it in the direction of the other object, and the draw_sprite_stretched function doesn't have a rotation option. I imagine there must be a much simpler way that I don't know about. Knowing this will help a lot with all my future projects as well. Thanks.