code

  1. F

    Problems with the walls

    Please I need some help. When I jump touching the wall, my character flies sliding and I don't know why. Looks like the wall has soap.
  2. VerdeBoss

    Slope inconsistency

    So I'm having a little problem about my slope inheritance code where players y position will follow through the assigned formula from each slope instances it collides on When the player follows through the terrain, player will get interrupted by issues such as "jumping five pixels up" upon...
  3. E

    SOLVED Problems with a code

    Hello, i speak spanish so my english is very bad,i have a problem, i wanna make a shooter game and i cant. Because "instance_create" its variable and not a function. i see tutorials and forums, and they have "instance_create" in orange. Hola, hablo español así que mi ingles es bastante malo...
  4. Alaska Minds

    Object Sprite Direction Tutorial (360/45 = 8 octants)

    GM Version: Studio 2 (Possibly later versions of Studio 1) Target Platform: Any Download: None (Code below) Links: round(), point_direction(), switch, sprite_index, image_speed Summary: Hello all I'm going to show you how to change your Object's sprite, based on direction. It all starts...
  5. Alaska Minds

    Easy Enemy AI (Idle, Chase, Attack, and Flee)

    GM Version: Studio (All) Target Platform: Any Download: None (Code below) Links: Example gif of the code below: https://alaskaminds.org/2020/02/11/game-maker-easy-enemy-ai-idle-chase-attack-and-flee/ Summary: Hello All! I'm going to show you how to create an enemy object that will Idle...
  6. Christopher A. Orestis

    Not collision with var = Do something...

    Hello, I would like to know how do the following: (This script is not working, would like to know how to fix this) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// var...
  7. Logan Bevans

    Ds_Grid Help

    I don't know a whole lot about ds grids but found this awesome inventory system that uses ds grids, well to remove items from the inventory you run this script. [ //If there's only 1 item in the inventory if(ds_grid_height(playerInventory) == 1) { //Only 1 item in inventory...
  8. sinigrimi

    Discussion No code displayed on docs.yoyogames

    how can I make it so that I see the code in the browser (google chorme), copying and pasting each time for character recognition is very exhausting. Thanks in advance!
  9. M

    Persistent arrays of object instances without adding to layer

    I'm coming at GML from a C++ background, and I want to have some global state to represent my player character, their inventory etc in an RPG game I've started. I really want to know whether it's possible to create an "array of structs / objects", similar to the following (C++): struct Item {...
  10. sinigrimi

    GMS 2 [solved]One more question

    This is a create event and when I run the compiler it says that room_type is not set. also if I directly insert a digit into the argument field, the code works. var room_type =5;//irandom(559); case"fixed": // if (up == true) and (bottom == false) and (left ==false) and...
  11. sinigrimi

    GMS 2 Is there a way to shorten the code?

    Hello! I have 560 ready rooms for the test rooms for the player (this is only at the first level, LOL), but to enter them as the example below seems to be hell. Is there a way to speed it up or will you have to spend a lot of time? I also have a fork between the scripts, it will not affect the...
  12. sinigrimi

    GMS 2 [SOLVED] I have problems with sequence and placement of code

    I create a roguelike. When I enter a new room, the doors are closed, enemies are generated, and when I kill them with oBullet (in the code for colliding oBullet with oEnemy_par it says that if the enemy has hp <= 0 instance_destroy, and then if (! Instance_exist (oEnemy_par)) { the doors open})...
  13. MattD227

    Path Finding

    hey guys, so what im needing help with is that i want my player(s) on screen to move where i click, however i want the game to find the shortest distance to where i clicked while avoiding obstacles in the way. For example, lets say i have a building and a doorway to go through, i want to be...
  14. UniqueLefou

    Menu, character screen, game logic (o_Player)

    Доброго времени суток, товарищи. = GMS 2 = использую и у меня возник такой "новичковый" вопрос. Посмотрел приличное количество видеоуроков, касается Shawn Spalding и HeathBeast и не только, сделал с их помощью этот скелет, но, к сожалению, у них нет этой темы видеоуроков ( да и не особо...
  15. M

    GMS 2 questions about collision_line

    now I use this command in this way if !collision_line (enemy_obj.x, enemy_obj.y, object_player.x, object_player.y, object_wall, true, false) { further a long code so that it follows the player } it only works on 1 enemy, only 1 enemy reacts to me, and thus, when he sees me, he launches a...
  16. M

    questions about the code

    1) Does this code work in GameMaker Studio 2? when I enter it in the second GameMaker it says to me that there is an error in line 5, as I understand it because of the quotation marks (but I'm not 100% sure), if someone know how will replace it, tell me please 2) I don’t fully understand how...
  17. 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...
  18. SendTheGravy

    "Wait" command?

    Hi. I'm super new to programming and was just wondering if there is a "wait" command when programming. I want to have a pause between a sprite change on an object, how would I go about doing that, thanks! :)
  19. I

    GML One Object Instance Change HELP "GML Code"

    So what I'm trying to do is make a "peg" object start its sprite animation when another "Ball" collides with it. There are multiple duplicated "peg"s around the screen, but when one collides with the "Ball" every "peg" on screen starts the animation. I would like to make each individual...
  20. Liam Earles

    Legacy GM Need help coding the punch mechanic!

    I really need help right now with this character I'm doing for my game, and it's getting very frustrating. I'm trying to code Idle, Walk, Jump and Punch animations together, but with one of the playable characters it's not working. Every time I crouch (Which is a cartwheel technique BTW), and...
Top