To add to this i could also use a good guide on making menu screens. I am wanting to make a start menu (simple) as well as a end game/credits screen.
Edited by _257168, 12 March 2012 - 08:04 PM.
Posted 12 March 2012 - 07:58 PM
Edited by _257168, 12 March 2012 - 08:04 PM.
Posted 12 March 2012 - 08:06 PM
image_angle+=10;//10 is rotation speed
image_angle-=10;
bullet=instance_create(x,y,obj_bullet);//assign a temp variable to the created object bullet.direction=image_angle;//set its direction to image angle of object creating it bullet.speed=10;//set the speed for the bullet bullet.image_angle=image_angle;//set the angle of the bullets sprite //etc...
Edited by Jakyl11, 12 March 2012 - 08:06 PM.
Posted 12 March 2012 - 08:15 PM
if you have pro version you can use image_angle
left keyimage_angle+=10;//10 is rotation speed
right keyimage_angle-=10;
then to shootbullet=instance_create(x,y,obj_bullet);//assign a temp variable to the created object bullet.direction=image_angle;//set its direction to image angle of object creating it bullet.speed=10;//set the speed for the bullet bullet.image_angle=image_angle;//set the angle of the bullets sprite //etc...
now if you dont have pro it takes quite a bit more to code
Edited by _257168, 12 March 2012 - 08:25 PM.
Posted 12 March 2012 - 08:25 PM
Posted 12 March 2012 - 08:33 PM
do you need an animation for the object?
if you dont, you can take a right facing version of the sprite, and add a rotation sequence (counter-clockwise, 360 degrees in 360 frames)
then, where you use image_angle in Jakyl11's post, replace it with image_index.
Edited by _257168, 13 March 2012 - 06:10 PM.
Posted 13 March 2012 - 06:10 PM
Edited by _257168, 13 March 2012 - 06:27 PM.
Posted 13 March 2012 - 06:50 PM
Edited by _163997, 13 March 2012 - 07:01 PM.
Posted 13 March 2012 - 07:10 PM
Posted 13 March 2012 - 07:14 PM
Sweet, I got it (had not used game maker with direct code before) Thought hat looked a lot like small basic script
The problem i am having now with the sprite is that its in a constant counter clockwise rotation. But i do have control over the ship. (mind the fact its endlessly turning counter clockwise.)
//rotates counter clockwise when left is pressed
if keyboard_check(vk_left)
{
image_angle+=10;
}
//rotates clockwise when right is pressed
if keyboard_check(vk_right)
{
image_angle-=10;
}
Edited by _163997, 13 March 2012 - 07:18 PM.
Posted 13 March 2012 - 07:32 PM
Posted 13 March 2012 - 07:45 PM
Edited by _163997, 13 March 2012 - 07:46 PM.
Posted 13 March 2012 - 07:53 PM
Woo hoo, that was my first contribution to this site! I usually hassle people - it's good to give something back. If you have any other questions just holler.
One little thing to consider, is the bullet object being created at the centre of your ship sprite or at the tip of your ship?
Posted 17 March 2012 - 08:22 PM
0 members, 0 guests, 0 anonymous users