A simple script to spawn an object at an offset from the current object taking rotation in to account. Great for top down/space shooter games.
///scr_bullet(xoffset, yoffset, object);
var xx = argument; //x offset
var yy = argument; //y offset
var bullet = argument; // object to create
var dis = point_distance(x, y, x+xx, y+yy); //distance to offset point
var dir = point_direction(x, y, x+xx, y+yy); //direction to offset point
x + lengthdir_x(dis, dir + image_angle),
y + lengthdir_y(dis, dir + image_angle),
@chaffXgrenade’s and my submission for the #TeamUpJam. I did the programming, chaff did most of the art, and the music is courtesy of the http://open.commonly.cc/ open game art bundle. It’s ugly, and crude, and full of bugs, but what do you expect. I’d rather it go here for people the play around with and learn from then sitting on my PC for 6 months before eventually I delete it.