1. R

    SOLVED [SORTED OUT]adjustment in the boom codes

    hello guys, i'll ask for another help here. I'm doing a mechanic for my player, he has a spear and uses it to attack, doing lunge attack and throwing the spear and then it goes back to his hand. Well, the whole code works, it's almost perfect, but it has a small problem: when the boom comes...
  2. Christopher A. Orestis

    Set to position issue

    First things first, I hope I posted this question to the correct thread. If not, I do apologist. This is code related so I figured this would be the proper thread to use. ========================================================================================================== My issue: Objects...
  3. FoxyOfJungle

    SOLVED array_delete() not working as expected...

    Hello! I've been trying to solve this for a while, but it seems to me a GMS 2 bug maybe (or not?). I'm gonna explain: 1 - I create an array of structs; 2 - I loop through the array and try to delete all items, but it doesn't delete everything, it skips some... See: array[0] = { aa : 0...
  4. R

    [SORTED OUT]Automatic trunk generator

    Hello guys, I come here to ask for help with a problem of generating baus and their positions. I'm trying to make a system to create random chests on the map. Code below for better understanding: var inimigo_x = irandom(room_width) var inimigo_y = irandom(room_height)...
  5. DGNNY

    SOLVED Get X POSITION of sprite

    Henlo on my draw GUI event, I draw an icon for an ability and draw text over it to represent the cooldown i want the position of the text to be relative to the position of the icon, but i don't know how to get the x position of it. sprite_get_xoffset returns 0 because it only gives the position...
  6. zendraw

    GMS 2 move a point along path

    so i want to move a point in a path, in a loop somthing like this var i=0; repeat (path_length) { path_position++; } but how to do it? you cant set a point manually on a path. path_position is read-only.
  7. S

    SOLVED Hi. I am trying to code a score and lives ui for the top left hand corner of the screen. It's not working.

    Hi. Basically i have coded a ui for the player's score and lives. Yet i am having 2 problems with the outcome when i press play. The first problem is that the string SCORE and the string LIVES are on top of each other (i am assuming the same x and y coordinates) and are not how they should be...
  8. Lens

    SOLVED How to make other objects above an specific one have their events triggered?

    Good morning/afternoon/evening! I'm making a tile-matching game and need pieces to fall once a said line gets completed (removed). Thus, I tried making a if object.y < self.y with(object) triggeringvariable = true; once it turns true, the object gets their ".y += 30". The problem is, instead...
  9. V

    Legacy GM lengthdir_x,y help

    Heyall, I'm trying to skip the trigonometry because it's just not working for me regarding all the different negative numbers i'm working with. I want to jump from x,y1 at an angle (direction) of 280 degrees and 100 pixels in said direction in order to land on x,y2. I cannot for the life of me...
  10. atmobeat

    Easiest way to get Sprite at position

    Greetings gamemakers! Is there a sprite equivalent of tilemap_get_at_pixel? If I place some sprites on an asset layer but later want to check a position for some sprite, how might I do that? And just fyi, the sprite may be on a completely different layer than the one I placed it on in the room...
  11. Axl Trauts

    Different x y positions on several instances of same object

    Hi, I am trying several things for this with no luck yet. I created a shop, where you can buy 1-4 wingmen for the player (a plane). They will go to their respective position: two on the left, one behind the other and the other two on the right, one behind another, like a V formation. When the...
  12. E

    HTML5 [SOLVED] Mouse offset ignoring centering of the canvas

    Hi all, I'm resizing and centering my game in order to keep the correct aspect ratio, which works great. Except for the mouse coordinates. It reacts correctly on the resizing part, but when I center the canvas, it suddenly starts using the whole browser window, so I have to move my mouse...
  13. T

    GMS 2 How to store an objects x position on the first step of a state

    Hello, New to GMS, first game and currently working on the movement for a platformer and I'm stuck on one particular movement. When on the ground the player is in the "grounded" state, by tapping left or right on the analogue stick the player enters the "dash" state. When in the "dash" state I...
  14. CrackedGamer§

    GMS 2 Movement and rotation help

    I have two objects, I want obj_a to do two things: A: Move to the closest instance of obj_b B: Rotate to still be on the same origin as obj_b AND face the same way as the closest instance of obj_b I am really having trouble getting this to work... I am kinda new to GMS although I have about...
  15. giraffeman210

    Drag And Drop How do I flip a sprite based on player position?

    I have an enemy in my game that follows the player. How would I be able to make the enemy sprite flip depending on if the player is to the left or right of the enemy so that the enemy is facing the player. I am not worried about up and down just left and right. I am using dnd in GMS2. Thanks!
  16. remka

    GMS 2 Position of player after room_goto()

    Hello again, Still fairly new in Game Maker, and still going trough Shaun Spalding's excellent platformer tutorial for GMS2, while trying to add my own touch for small details. This time I am struggling with room transitions (tutorial number 7 on YouTube). I am trying to add more params to the...
  17. Edwin

    Legacy GM [Superbly Solved] How to change position during a path?

    So, question of the day. I have moon object and earth object. Moon object starting a looped path and have absolute = false that make relative path to its current position in Create Event. I need to change moon object's XY to earth object's XY, but when I change it's position, it don't doing...
  18. FeetUpGaming

    Getting a tiles position

    Hey i'm trying to use a tiles position to add lighting in that area. for example i may have 5 or so torches in a room as tiles, how would i get the tiles position for each one? the lighting i can do the new game maker studio 2 tile system is confusing me. Thanks
  19. M

    Bullet shooting problem

    Already excuse me mistakes because I'm French ;) .. My problem is that I would like to leave the bullet the end of the barrel of my weapon, but I can not position the bullet instancier with "instance_create_layer" (The bullet is positioned originally sprite and I do not want that :bash:), help...
  20. PlayerOne

    GMS 2 [SOLVED] Finding a specific item in a ds_grid and subtracting it.

    Right now I'm creating an upgrade system akin to the Fallout 4 / New Vegas workbench system. Everything is set up but I need to find the first item id of an item that I'm specifically looking for. In this case the item id is a sprite that is used to identify items in my players inventory. Now I...