Page 7 of 9

Re: Game Maker Questions Topic!!!

PostPosted: March 14th, 2011, 11:09 am
by Jellonator
@alucard
Code: Select all
move_towards_point(playername.x,y,speedhere)

Re: Game Maker Questions Topic!!!

PostPosted: March 14th, 2011, 9:15 pm
by AwesomeJRFD
Question: What is the difference between Game Maker 7 for the Mac and Game Maker 8 for the PC?

Re: Game Maker Questions Topic!!!

PostPosted: March 15th, 2011, 10:34 am
by AlucardX60
jellonator wrote:@alucard
Code: Select all
move_towards_point(playername.x,y,speedhere)


Doesn't work. The object just moves left till it hits a wall and then right t the other wall across the room.

What I want it to do is aline itself with the Ball objects Y position. but not change it's X position.

Re: Game Maker Questions Topic!!!

PostPosted: March 15th, 2011, 3:02 pm
by Jellonator
idea;
Code: Select all
y = ball.y

if you want to make it mave at a certain speed,
use alarms

Re: Game Maker Questions Topic!!!

PostPosted: March 17th, 2011, 2:07 am
by Koopa Yoshi
How to make enemies chase player in a maze game

Put the Move Towards or whatever its called, its the 3rd move action in the moves section, put it in the Step event and type obj_player.x and obj_player.y

A Menu

If u cant do it the GML way, do it this way
Create five instances

one named New Game and the other named Continue
the other two is the two buttons' highlighted version
and the control object

put the highlighted New Game and the non-highlighted Continue in the room

when pressing the down button, put this in the New Game object

Change instance continue to highlighted_continue and highlighted_new_game to new_game
put this in the control object when the space key is pressed, just use the check instance action, if highlighted_new_game is equal to 1, go to the first level and vice versa, if highlighted_continue is equal to 1, load the game

simple? this is for those who doesnt want to type gml
and will be harder for more than two options

Pause

deactivate all instances and set notme to true

Code: Select all
{
instance_deactivate_all(true);
instance_create(pausebutton1,x,y)
instance_create(pausebutton2,x,y)
instance_activate_object(pausebutton1);
instance_activate_object(pausebutton2);
}


that will deactivate all instances except for the buttons in the pause menu
when the resume key is pressed, or the resume button is clicked
Code: Select all
instance_activate_all;


i hope this helps. The pause code is not tested, so im not sure it will work

Re: Game Maker Questions Topic!!!

PostPosted: March 17th, 2011, 3:01 am
by Blablob
Koopa Parayoshi wrote:How to make enemies chase player in a maze game

Put the Move Towards or whatever its called, its the 3rd move action in the moves section, put it in the Step event and type obj_player.x and obj_player.y

So enemies are not affected by the maze? If they are, then this wouldn't work because the only thing that the enemy knows is to follow the direct coordinates of the player. If there's a maze in his way, that's just not going to work.

Re: Game Maker Questions Topic!!!

PostPosted: March 17th, 2011, 3:03 am
by Koopa Yoshi
i only used it in a boss battle though, but i think Step Avoiding action will work

Re: Game Maker Questions Topic!!!

PostPosted: April 9th, 2011, 7:44 pm
by Jellonator
a much simpler following object;
Code: Select all
{
  {
    if otherobject.x > x
    x += speedhere
    }
    {
    if otherobject.x < x
    x -= speedhere
  }
}
// this code is more for platformers.
//swap out x with y for y position btw.

or
Code: Select all
dir = point_direction(x,y,otherobject.x,otherobject.y)
x += lengthdir_x(speedhere,dir)
// with y position, change  the above line with this; y += lengthdir_y(speedhere,dir)
// this also slows down as the object draws closer, but speeds up when its farther away in some cases.
//very good for pong games.

Re: Game Maker Questions Topic!!!

PostPosted: June 27th, 2011, 3:56 pm
by SuperLuigi9624
How do I cut sprites?

Re: Game Maker Questions Topic!!!

PostPosted: June 30th, 2011, 4:01 am
by Koopa Yoshi
Set the Opacity to 0, then select Replace. Use any tools to erase colors rather than the Eraser tool

Or select an area with the Selecting a region tool, then drag it away to cut it