code

  1. K

    GMS 2.3+ Struugle to fix some glitch in my code

    so i'm following a tuto ! and i'm stuck at a dialogue box episode ! and i tried to fix the error but i'm to new to this and i don't know where the error is ! if you could help me it would mean a lot to me ! so the error is : local variable _txtb_x(100067) not set before reading it. at...
  2. S

    Android Checking Game Version Issue on Android

    Hi dear GM community, I have issue with Checking Game Version on Android. On windows test works like charm, but after testing on android test its vice versa. When new version bigger is, he goes directly in Room Menu, but he should go in Room Update. if web_version > "1.2.2" //the version...
  3. L

    enemy

    Olá, há alguns dias estou tentando encontrar um bug no meu código para criar um inimigo. Se alguem puder me ajudar fico muito grato etapa: if (distance_to_object (obj_player) <150 && hp> 0) { mp_potential_step_object (obj_player.x, obj_player.y, vel_enemy, true); } if (hp <= 0) { temporizador +...
  4. Yellowhite

    Something i dunno, specifics hitboxes collisions codes

    Hi guys! I wanna ask for you (something i dunno how code it) Imagine i have a object, with collision mask (FULL IMAGE - SQUARE) and something like: "If you touch the red part of him the world changes, if touch the blue, you start your adventure!" or something like that... for explain better (i...
  5. JelleB

    saving a ds_list with arrays inside to a ds_map

    So i have a saving and loading system with a ds_map so basically i save all of my global variables to the ds map it gets saved to a file then i load the ds maps saved variables back into the global variables. But it wont let me save my inventory (ds_list) that has arrays inside of it to the ds...
  6. Null-Z

    GML (SOLVED)State Machine issues.

    In my prototype, I tried to give the player object a normal state and a hurt state using, in the create event, "state = scrNormalShip". I put the code to control the ship in that script, and the variables for the attributes of the ship(like Hp = 3, SpecialShot = objSShot1) into the create...
  7. MrLostProphet

    GMS 2.3+ Shaun Spaulding top down tile collision system help

    I've been following Shaun Spaulding's Action RPG GameMaker tutorial on youtube. In his third episode in the tutorial, he focuses on making a tile collision system. I've run into an issue where when my player object collides with something going to the right, the players position is reset to the...
  8. U

    Object that bounces Player in 2 directions

    Hello, I want to create an object that bounces the player in two directions. The direction depends on where the player touches the object. If he touches it by jumping on it he goes upwards. (like a bonus jump) and if he touches it from the bottom he gets kicked downwards. My code looks like...
  9. 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...
  10. G

    GMS 2.3+ help x2

    Cada vez que intento probar mi juego, solo me arroja un error, ya verifiqué mi código una y otra vez y todavía no puedo lograr nada ... Lo dejaré completo para ver si puedes verificarlo y ver que esta mal "cmd" / c subst Z: "C: \ Users \ Hogar \ AppData \ Roaming \ GameMakerStudio2 \ Cache \...
  11. Kirbeh

    GMS 2 weird glitch

    Ok so, I'm kind of new to coding and, obviously, tweaking and debugging. So I've been following Shaun Spalding's tutorials. It seems they are pretty flawed for me though, but this far in I can't exactly switch to a new one. So, his collision scripts were nowhere near loop-proof, so I managed to...
  12. V4NTT4BL4CK

    HTML5 collision problems

    when my player collides with X walls, he gets stuck there and can't go back. this is my code: #region { sprite_index = spr_1; var sp = keyboard_check(ord("A")) - keyboard_check(ord("D")) if (sp != 0) { if (place_free(x + Sprite4 * 5, y)) x -= sp * 5; if (place_meeting(x+sp,y,obj_wall))...
  13. V4NTT4BL4CK

    GMS 2.3+ Collision issues!!!

    I've been working on this prototype minigame to learn how to use Game Maker Studio 2, but I have a problem that I don't have with other '' walls '' or colliding objects ... when I jump to the roof or platform, my character should stop and return to the ground when he touches the object but...
  14. S

    Discussion speed

    I found out that the speed in all directions is positive in itself and the variable speed reflects the speed modulus or its value, but only I have a function that changes the speed to the opposite, gradually adding to it with the help of motion_add a part of the speed with the opposite sign...
  15. S

    flashing label

    I have an idea to make flashing label. When the player will be near some object (for example rock) there will appear flashing label (press "H" to hide or sth like this). I know how to do it if the label will be an object. But i don't want to make one more object for such thing. I wanted to make...
  16. S

    GML Clever bullet

    Hello everybody, i wanted to make clever bullet. The bullet, knowing the speed of the player and the direction of his movement, with the condition that the player does not change either the speed or the direction. Must calculate the angle at which it will fly out to intersect with the player So...
  17. bodilliam

    GML Grid Code

    Hi guys I am somewhat new to GM, and was wondering if there was a easy way to make a snap to grid. There is on Construct 3 and I was just interested in knowing. Thanks!
  18. S

    Trying to work with motion vectors

    So what is my problem? I want my spaceship (or sth like that) from the start of the game move in one direction with a certain speed. I used motion_set() and it works fine for me. But also i have 2 buttons to rotate spaceship (i used image_angle += *angle*). And the next step is that when player...
  19. S

    GML How do I use the reverse command?

    I need to create something like this: but using code, not DnD™ . How do I use the reverse command? Thanks in advance, and sorry for my broken english.
  20. Yellowhite

    SOLVED Help to object in bad view position

    Hi guys, i recently have created a room of 3840x2160 and i put it a view of 1920x1080 (i can't change this, it's necessary) So, it's look its like thats: So, i have created a object called "Dialogbox" and in the Step code i put to him be like: x=view_xport[0]+12, y=view_yport[0]+24 and so, the...
Top