In my game a dog is following the player. Currently image_angle = direction. The dog has a four-directional sprite (dogUp, dogDown, dogLeft and dogRight). How can I change the sprite based on the direction of the dog, and how can I make it that the dog only travels left, right, up and down(i.e...
As you can see the image left looks good, but the image right has a line where you can see the background of the room through the wooden floor sprites which I out of course not want.
the sprites fit perfectly since they are 32x32 and tiled with a 32x32 grid, it should acctually not happen to...
So i'm trying to make an enemy return back to a set path after being distracted by the player.
How I have it currently works in some places but not in others (which I don't get)
For example if the enemy is distracted to the right side of the path they return fine but if they go off to the left...
so im currently making a platformer for a school project
and I want to make a horizontally moving platform.
its plain simple I thought
look at the pic too see what I made
inside the create event there is movingright = 1 script
and inside alarm 0 there is a movingright = 0 script
I thought of possibly making an object mimic the background but sadly the background is moving. Basically I want to move an object behind another invisible object, and as it moves behind that object it should be completely transparent, the parts that have moved behind it so far. Pretty much...
I'm currently making a game on Game Maker Pro. I've only just started and I'm still doing the moving code for the character.I'm using tiles to add graphics to my game. I use invisible object to control where the player can and can't go. I'll put up code, screenshots etc. if you need it. This is...
I try to create a NPC, randomly roaming on the grid, actually nothing fancy.
NPC should choose a random direction(up, down, left, right) and go 64 pixels (gridsize) to this direction.
Teleporting to the position isn't quite difficult, .... moving however ...
I tried with...
phy_rotation = -point_direction(x,y,mouse_x,mouse_y)
global.rotation = phy_rotation
var xaxis = (right_key - left_key);
var yaxis = (down_key - up_key);
// Get direction
var dir = point_direction(0, 0, xaxis, yaxis);
// Get the length
Im currently having trouble getting my character to attack while he is moving.
1. I can get him to move and attack separately
2. I can get him to start the attack animation and move while the animation is going
but I CANT get him to start the attack animation while mid movement, and after I...
I'm relatively new to coding.
Let's say I have a player object, and I want this obj_player to be able to move between three points on the y axis.
The first point will be the center of the y axis (room_height/2)
the other two points will be the halfway point between the center and the top and...
Why is it not easy to get instances to stop moving in game maker?
if x = <random value>
moving = false
and I've also tried
if x = <random value>
speed = 0
both in step events but in the first case, the instance keeps going and in the second, it twitches...