game maker language

  1. S

    i need help destroying other(without using event collision)

    if(place_meeting(x,y,obj_enemy1)){ instance_destroy(other) } The code above is the one that isn't working. I'm sure you have the idea of what I was trying to do. I'm guessing its because its giving true or false output, but I'm not sure how to make any alternatives without using event...
  2. K

    SOLVED Trying to make it so a sprite of an object changes if another object from a list is within that object's radius.

    Hello everyone, I'm making a Real Time Strategy game with game maker studio 2. I'm trying to make it so a sprite of an object changes if another object from a list is within that object's radius. The goal is to make it so when your troops are within the enemy's radius, the enemy becomes...
  3. EvanSki

    Question - IDE GMS2 and different languages

    I was wondering if GMS2 has the ability to use different languages, obviously GML but looking at the preferences menu I find it odd that the gml syntax highlighting and all those fun options are under text editors > code editor and then I started thinking about how theres a plugins tab with only...
  4. M

    GMS 2 [Help] room_goto shuts down the game

    I have been working on a 2D platformer and I've made a menu for the game. I want there to be a option that you can click on that brings you to the tutorial room, but every time I click on that option it closes the game. code: switch (menu_index) { case 0: break...
  5. Dwighty4000

    GMS 2 why doesn't it work the way it should?

    why does it take twice as long for a settings sav until alarm [0] is triggered if the whole program has a "settings.sav" in "% appdata%" although this does not maintain any contact to this and yes the text message is triggered immediately right at the beginning which must mean that alarm [0] is...
  6. E.M.I

    GMS 2 Idle animation code doesn't work properly

    Hey everyone! I'm starting to work in GMS2 and ran into a bit of trouble while writing code to make the player change to the appropriate idle sprite depending on the last direction they walked to. As you can see in this video the character always uses the down idle sprite...
  7. M

    GML Play can walk through walls when angled a certain way

    I have always struggled with creating walls and for that reason I try to create games that don't require them however that's bad habit and I think it's about time I get this resolved. I only know of one way to create walls and that's to check the place meeting of the player and the wall object...
  8. M

    Making an ememy stop moving when it is near the player

    The code I have works for the most part however the enemy jitters like crazy if I'm angled a certain way. My character has to be facing a specific way for it to change the sprite index to standing and stop jittering. Enemy Step Event: if (distance_to_object(obj_player) == 100) {...
  9. M

    GML Problem With Alarms

    I'm creating a game called bomb run and in the bomb spawner object I have 3 alarms. One alarm creates the bomb somewhere random in the map, another alarm decreases the spawn rate of the bombs but does not let it hit 0, and the third one makes the bomb animation play faster so the bombs will...
  10. M

    GML Player gets stuck in wall

    I've been spending the last while trying to create a wall that works fine, I've watched 2 or 3 youtube tutorials but all are giving me the same result regardless; my player gets stuck in the wall and I cannot get out. I want to know what the best way as to go about creating a wall that works...
  11. M

    GML Set image angle with WASD

    I've came across something I've never done and I can't even begin to fathom how I would go about doing this. I want my character to rotate depending on which way I am moving but not with the mouse, I can do it with the mouse however there is no mouse required in this game. I want my character to...
  12. M

    Room only sometimes

    I'm creating a wave based system in my game which was going just fine until this happened. I have a keyboard shortcut to cut to the next room by pressing the letter "K" on my keyboard and the room has buttons, when I use the shortcut all the buttons work fine and it sends me back to the gameroom...
  13. M

    GML My buttons are changing ALL of the text in the game.

    I apologize for posting so frequently here, I'm new and I'm constantly coming across problems I can't figure out how to solve, the more that gets solved the less I have to post here because I know what to do :) So I just got done watching a tutorial on buttons for youtube and the button works...
  14. M

    GML draw_set_alpha() sets everything on screen invisible {Solved}

    I'm trying to create a title screen for my game so it says "Can You Survive?" and then under it, it says "Press Enter To Start" and I want that part to fade in and out repeatably until they press enter. I know how to do it but for some reason "draw_set_alpha(0);" sets the "Can You Survive?" part...
  15. M

    GML Walls Won't Work

    I'm very new at coding this so this might be an obvious mistake and I apologize but I'm trying to make it so my player cannot walk outside of the room. I created a sprite for the wall which I don't think was necessary actually considering there is no picture for the wall and I created an object...
  16. U

    Legacy GM [Help]Fighting game [solved]

    Hi, I'm actually making a fighting game (for fun) since a long time, the problem is I'm not an expert on the field ! I'm better in art, design, animation etc...but programming is difficult for me for the moment, I had some help from a friend but he's working on his projeect so I need to improve...
  17. G

    How to access variables from another script WITHIN an object?

    I have an object that uses ammo, obviously I cannot define the variable in the same step script as the bullet firing etc, as the ammo would be reset every time it looped. So, within an object how can I access a script in the create event from a script in the step event? Something like...
Top