This is my first forum post here, so if I neglect to put any important code please tell me and I'll try to include what's needed.
I'm working in GameMaker v1.4.1804. I've followed Shaun Spalding's JSON based save/load tutorials and I'm run into a problem. Whenever I load my game, when I go to...
Lately I have been having issues with implementing a sliding door mechanic I checked the code and it looked bulletproof but yet when put into practice it does not work.
in the Create_Event I added a variable "stop = false;." and a Alarm function that sets that sets the stop variable to true...
Object1 will spawn correctly, while object2 won't be affected by the given coordinates given in its create event.
Object2 will remain at the x & y coordinates that it has in the room editor.
I have many other object using this system and it seems to work fine.
I gave object2 coordinates of my...
Heyall I'm using the draw_sprite_pos function to draw a sprite on an angle according to a top-central horizon point. With the help of image scaling I have determined the top left and right two circles and their respective x and y positions. (green) as well as the bottom blue circles y...
Why do the "x" and "y" jump back if the player ends to walk
I have a player object and I have a flashlight object. When the player is walking, the coordinates are taken over by the player and expanded to their "x + 100" and "y + 20".
But if the player is not walking, then it takes over the same...
Is there any way to get / change sprite's coordinates / scale / rotation in Asset Layer using code?
var a = layer_get_all_elements(layer_get_id("AssetLayer"));
for (var i = 0; i < array_length_1d(a); i++;)
if layer_get_element_type(a[i]) == layerelementtype_sprite
I am new to GML and GMS2 but am in love with everything and the amazing community.
So, I am already able to successfully shoot a projectile object, from the players location/gun, towards the mouse click location/enemy. (In a top down 2D shooter type game).
However, I am...
So I'm passed the point of initial learning and I decided to start over again, now a bit more professional.
I had a project going that worked really well, but the code was extremely sloppy and became too
chaotic to handle anyway.
Now one of the more important things in my project...
I am wondering if there is a way to check a coordinate for the draw event?
I want to make an if statement that performs like this:
if any object's draw event is drawing any sprite meeting with this coordinate, then perform the code between the curly braces.
Is there any way to do this...
basically what I'm trying to do is make it so that when the player presses Z, each instance of every object parented to a parent object is stored but is no longer in the room and a new setup is drawn, and when the player presses Q, the new setup is stored and the old one is shown and i need to...
Anytime i use draw_sprite using relative coordinates such as:
The sprite will become displaced as the object moves, but i want the sprite to stay fixed relative to the object, and the problem is even further amplified when dealing with views in a room. Is there any...
Hi folks, I`m having a bit of bother, I think I use `other` but not sure.
I`ve got an object and it moves with keys and rotates, easy enough. I have another object and I want to position it at the same place and angle( so it is on top of it and moves and rotates with it.) , how do I pass the...
I'm looking for a way to to detect the exact coordinates at which a collision between two objects is happening. I'm making a game similar to minigolf, so I need to set the bouncing direction as accurate as possible when the ball collides with a wall or other object. In the image I...
So, im really new with the engine and I have really little experience with java so i ask sorry beforehand for my english and my newbie skills.
Anyway im trying to make a title screen, so I made a sprite with the the tile put it in an object and put it in the first room, I made some lines of code...
I'm having a little bit of a coordinate problem.
I'm trying to use a 'heat map' to direct my unit objects. Head for hot sectors, avoid cold ones. It's not really working. They always head for the top left corner. I believe this is a scaling problem, but I don't know what to try next...
So at the moment Im working on a game that has multiple enemies with set paths in room 1.
They are currently set to persistent.
When I go to room 2, the paths are unaffected, but the instances are all moved.
The y being the biggest change which changes it to minus whatever its y was...
I have to sprites:
Warrior_Idle (width/height - 65/52)
Warrior_Attack (width/height - 110/60)
So when I use sprite_index to replace "idle animation" with "attack_animation", the animation jumps to the right. Before applying new animation, I need to adjust postion, e.g. set x -=42, y -=2. How...
I have an object that is moving about the screen and at one point stops and after a while starts moving again.
Let's say when it stops, how do I save it's x and y in a variable or something so that when the object starts moving again the x and y that I saved do not change?
I'm writing a project in which an object moves and turns in 2D top view. Right = CW, Left = turn CCW, Up = inc speed.
Now, when the speed is >1, not all sequential x,y points along the direction line are visited. How would you suggest I get at all these points (without doing analytical...
I am currently making a game, where you can drag a circle object away from a rectangular closed path.
The path is defined through the collision mask of an object, which is an invisible, non filled, 1 pixel wide, rectangle.
Now if you place the circle object directly back on the path...