1. A

    GML How do I attach my weapon to my character if the model is 3D in a 2D space?

    Hello everyone, I recently replaced the 2D sprite of the gun I was using with a 3D model of a gun and ran into some problems. The 3D model was rendered from one side so that it could mimic a 2D object. Previously the 2D gun sprite was at least close to the character, but now it's pretty far...
  2. V

    Ammo pick up system

    So i am new to programming and im making my first game. I was wondering if i could make my game so when i kill an enemy, he drops ammo and my character picks up the ammo and it automatically reloads my gun. How would i do it, would really appreciate it i couldnt find any tutorials about it.
  3. Tony Brice

    Released My new game - Tommy Gunn - is now available.

    Hi guys, I've now released my eighth game using GMS 2 and put it up for free on The version uploaded there is currently the same build as I submitted for the latest SyntaxBomb coding game competition but I'm possibly going to build on it, as I had to axe a few parts just to make the...
  4. B

    GMS 2: Realistic First person shooter engine!

    Hey guys! So I've found quite a lack of 3-D engines in GMS 2 that actually look good and have smooth gameplay, so I made one myself! It's a 3-D FPS engine that runs on GML. I imported it from GMS1 to 2 after working on it there for a bit, and I'm finally publishing it! Selling for 2.99 USD on...
  5. Obj_Neil

    Create a burst fire gun or enemy spawner

    GM Version: Gamemaker 2 Target Platform: ALL Download: N/A Links: N/A Summary: A way to code a burst fire gun/torrent, which can also be used to spawn enemies. You can control how many bullets to shoot, how fast to shoot them, and how long to wait between shooting. Tutorial: If you want...
  6. Rahiokawines

    GMS 2 Platformer gun not firing at certain angles when on ground (Resolved)

    I have this problem where my bullets (Ninja Stars) will not fire when on the ground, specifically when I'm pointing to the right. I've tried changing the size of the bullets, but it showed little difference. Please help!
  7. timartinelli

    GMS 2 Help with Project Player + Weapon + Mouse

    Help with Project Player + Weapon + Mouse Hello, friends, I have a hard time defining how best my game works with the Sprites of Weapons + Mouse to do the sights. See the image below, I made my Player without the arms to put the arms together with the Weapons, not if this is the best way. But...
  8. P

    Question - Code Different bullets same gun?

    Hello! I'm just a begginer and I apologise in advance if im asking something someone else has tackled before. I'm trying to develop my first game but i've encountered a problem regarding my weapons. Thing is I'd like my player's gun to shoot different projectiles switching its bullets from one...
  9. S

    GML How to get bullets to shoot in direction character is facing? [SOLVED]

    Hi, I'm completely new to GMS2 and GML/coding. I've been following Shaun's platform tutorial and managed to change the code a bit so the bullets only shoot in the direction the character is facing (because I don't want my game to use the mouse). I found that specific part of the code online and...
  10. C

    GMS 2 Need help with having player shoot out of gun instead of out of center of player sprite.(SOLVED)

    Hello! I'm new to GameMaker 2 and have undertaken working on a top down shooter. I've figured out how to get the player to shoot but I cant seem to get how to get the bullets to come out of the gun instead of the middle of the sprite.(the gun is part of the sprite, not a separate object) And...
  11. S

    Legacy GM how can i collide with drawn objects

    I dont know how to collide with my "gun" draw event code: if gun !=-1{ draw_sprite_ext(spr_sword, gun, x + lengthdir_x(4, point_direction(x, y, oBody_parts.x, oBody_parts.y)), y + 4 + lengthdir_y(4, point_direction(x, y, oBody_parts.x, oBody_parts.y)), 1, 1, point_direction(x, y...
  12. S

    Legacy GM [SOLVED] Having gun in hand!

    I'm making ragdoll game and guns in ground are visible but if i pick them up they can't be seen... o_O code in object player step event: with Hand_R{ if (mouse_check_button_pressed(mb_right)) { if (gun == -1) { with (instance_place(x, y, oGunPickup)) { other.gun =...
  13. S

    Legacy GM [SOLVED] Adjust player's weapon positions when colliding with a wall

    I have two floating guns that follow the player and orbit them based on the location of the cursor, so when the cursor is on the right side of the player, the guns will be on the left side of the player, or if the cursor is above the player, the guns will be below the player, etc.. The problem...
  14. A

    GML Flipping bullet on off center barrel?

    Im new to game maker 2, and well creating games in general, ive been following some tutorials and decided to be abit creative early on by designing a off center barrel gun for my sprite, when the bullets fire to the right they seem to match the barrel, but they dont when the sprite flips to the...
  15. TheOnlyWRT

    Setting a bullet's direction

    I am trying to use just one bullet object in order to conserve the use of objects. In the step event of the different enemies when they shoot, I assumed that you could set the direction of the bullet in the step event, but that just changes the bullets direction every time the enemy changes...
  16. TheOnlyWRT

    Shooting Mechanics not working

    Hey guys, so I am making a platform game and I am integrating delay between each shot. However, I cannot get it to work. I am using alarms to handle the delay, and it works the first time, but after the first shot, I can shoot as much as I want. Here is the code: In the create event //pistol...
  17. C

    (SOLVED) Enemy holding gun

    Hi I'm new to the forums and was hoping for a little help. I have an enemy spawner that creates the same enemy object throughout the map. The enemy object then create their own guns that sit on top of them and can rotate towards the player depending on the range of the player. I want to use...
  18. N

    2D bone animation - point gun at mouse

    How is this handled? It's some form of kinematics which I kinda understand and I have a very solid grip of trig, but I don't know how to start with having both hands attached to a single weapon with each arm moving independently and the torso also moving to accommodate extreme angles. How...
  19. T

    3D Help! My weapon goes through walls..

    I am working on a 3D FPS game, but whenever I look down or get close enough to a wall, the weapon goes into the wall/floor. What can I do to prevent this?
  20. D

    Legacy GM NEED HELP Placing a gun in four directional game

    Hi everyone! I'm coding a shooter with 4-directional sprites. I have programmed the top and right sides to place my gun in the place I want it to be. For the bottom and left animations of the character, I want the gun to be in a different place so it matches the character movement, it has to...