Jump to content


NDest

Member Since 24 Nov 2010
Offline Last Active Feb 29 2012 04:14 PM

Posts I've Made

In Topic: How to make objects act only when inside the view

25 February 2012 - 07:35 PM

Not sure how to do it quite how you said - however I know the code for an object to check whether it is close to you

if distance_to_object(obj_character) <= 320
// 320 can be replaced with any pixel distance
then 
{
//commence code
}

~Blaze


Thanks but I can't use that way since the camera is always moving right and the ship can still move, but I think if a put a object fixed in the middle of the view I might be able to use that.

In Topic: platform game sprites

25 February 2012 - 07:30 PM

I thought there was a way in game maker now that you could import only sprites facing right and get the left facing sprites through code (rather than having to import double the sprites) butI cant seem to find such a function.


You can just use the game maker sprite editor mirror tool to make a sprite facing left, then change the sprite when you press the left button with sprite_index

In Topic: [HELP] Enemy code to follow Zig-Zag

20 February 2012 - 04:01 PM

Where it creates enemies at a certain time instead of a large room with pre placed enemies.


Well  I have pre placed enemies, but I wanted when they show on the screen, but i cant figure it out,
And about the sound thanks but i actually found it minutes ago :)

In Topic: [HELP] Enemy code to follow Zig-Zag

20 February 2012 - 03:43 PM

And for your Side-scrolling shooter are you using views or timlines to create enemies ?


what you mean by views or timelines?

In Topic: Sprite_index help

19 February 2012 - 04:58 PM

Do an else if

if (keyboard_check(vk_right))
{
    x += speedup;
    sprite_index = Player1_faster;
}
else if (keyboard_check(vk_left))
{
    x -= speedup;
    sprite_index = Player1_slower;
}
else {
    sprite_index = Player1;
}
Your way, it would check if it was going right, give it the image, then find it not going left and give it the not moving image.
This way, it will stop checking directions once it finds a match


Thanks it works :D