S
supernova12034
Guest
Hi there,
I'm just getting started, I watched the tutorials and built my first little game, now i'm trying to take the next steps.
The tutorial has you create a little shooter game, and has you shooting enemy objects, the problem is that the code has you shooting essentially using your mouse to aim(wherever you point the mouse is where the bullets will fly), what I would like to do is just have the bullets come out of a one place(like the front of the player sprite) so instead of using the mouse to aim, I can just use the player object to aim and shoot.
Here is the code:
This is coming from the bullet object, create event
Thank you, any help would be appreciated
I'm just getting started, I watched the tutorials and built my first little game, now i'm trying to take the next steps.
The tutorial has you create a little shooter game, and has you shooting enemy objects, the problem is that the code has you shooting essentially using your mouse to aim(wherever you point the mouse is where the bullets will fly), what I would like to do is just have the bullets come out of a one place(like the front of the player sprite) so instead of using the mouse to aim, I can just use the player object to aim and shoot.
Here is the code:
Code:
direction = point_direction(x,y,mouse_x,mouse_y);
// Bullet motion, to figure out direction of bullet fire.
direction = direction + random_range(-4,4)
//randomizes the position and dispersal of the
//bullets.
speed = 16;
image_angle = direction;
Thank you, any help would be appreciated