code

  1. D

    (Fixed) Enemy pushback different from given value

    When i first programmed the collisions with the enemies, it worked exactly how I wanted. But, it recently derailed and now it is fixed on (-)5 and not (-)10 . I thought it could be about the speed limits i put but all of them are (-)10 or above. I changed the values on the collision but it still...
  2. flyinian

    Design [solved]Tile collision code not working but, its close. I can feel it.

    Hey all. I am currently attempting to get this tile collision to work but, haven't yet. However, i believe I managed to narrow what might be breaking the code for me. When I disable the "else" statements within the "if" statements the player collides with the tile and i am able to move left and...
  3. D

    Dialogue sound everytime a letter is typed

    Hello I am a beginner at gms2 and I was wondering if anyone would help me I am tryting to make some kind of platformer or something I am not sure yet But at the intro of the game there is a dialogue while I was able to make it work and can t get my head around how to put a sound every time a...
  4. D

    GMS 2 *Title Change* Character not dashing when in the air

    So I am trying to make a variable to save me time when i call the letter 'Z' var zkey = keyboard_check(ord('z')) From my current knowledge, i know for ord() to work it needs to be in a argument which it is not in the code I wrote. However, writing if keyboard_check(ord('Z')) = true { do...
  5. KyleRansford

    GMS 2 How Does the Instance Creation Code Work?

    I have objects like, Sign Posts, Chests, NPC's etc, that can all have different actions. Instead of having multiple objects of the same type (Heart Chest, 1up Chest, etc.). Can I use the Instance Creation Code (when you double click on an instance inside a room) to specify what I want in the...
  6. S

    optimizing movement

    is there any way i can optimize this movement code to save space OBJ_Player Crate//: idle = 1; walking = 0; up = 3; right = 2; down = 1; left = 0; Action = idle; Direction = down; View[1,3] = v_p_upIdle; View[1,2] = v_p_rightIdle; View[1,1] = v_p_downIdle; View[1,0] = v_p_leftIdle...
  7. K

    Question - Code Tab characters showing up in draw_text?

    I'm not sure if this is a bug or not and I can't find it anywhere on the internet. I'm simply drawing text to the screen as seen below: but when it renders, it seems the indentation (tab characters) are also being rendered as seen here: The tutorial I'm following along with does not have...
  8. XirmiX

    GML [SOLVED] Assign code to just-created instance BEFORE it runs its create event?

    I've found trouble doing this. It essentially boils down to having the create event code from the object be placed inside the object/script that creates it. The "with" variable does not help at all, wish it did, seems redundant otherwise. What happens is: Object creates an instance of another...
  9. C

    Need Help with programming a Menu system

    Hello, I am trying to program a simple menu system in Game-maker Studio 2, I am very new to coding so I followed a YouTube tutorial for help () However you can only press the down arrow and the S key and they send you to the very last option on the menu with no way of going up. Here is my code...
  10. EZTALES

    Legacy GM easier way to do textboxes?

    hey yall, i got a question for the forum, at the moment i have a basic way to make a cut scene with a textbox, but it feels tedious and i was wondering if i could make it simpler. heres how it works: when the player presses Z on a specific object, it will take him to a room and then the cut...
  11. Tuna

    Legacy GM Sprite drawing flashing issue [SOLVED]

    I have been trying for a while now to draw a melee weapon on my character, but whenever I have its position change throughout an animation, the weapon sprite flashes, sometimes for multiple frames. As you can see in this recording, the sprite is normal when being drawn as a single frame...
  12. M

    <SOLVED> Character Getting stuck running into walls

    It is not the collision sprite changing, since I have it at the same parameters for all sprites, It must have something to do with my collision code. Here it is, it is located in an object collision event if that might be causing it. //Horizontal Collision if...
  13. Edwin

    Legacy GM How to restart the script again?

    Hey, pals. I made a simple randomizing script with exception value, like if you want to get random value BUT, for example, without 100 or any value else. /// irandom_exc(x, exc) // Arguments var max_value = argument[0]; var exception = argument[1]; // Choose random value var value =...
  14. C

    Problem with collisions

    I am currently making an action platformer and i have problems with collisions. The code goes like this: Create Speed = 0 Step var move = (keyboard_check (vk_right)) - (keyboard_check (vk_left)) speed = move * walkspeed If (place_meeting(x + speed, y, wall)) { While (!place_meeting (x +...
  15. O

    Help With Charged Move

    I'm still learning with GMS 2, and recently i tried to create a charged mechanic. Basically, what i want to do is when i press "space" key, the player object will stop moving and begin charging. And then, when i release the "space" key, it will gain a boost movement for several time before going...
  16. H

    GMS 2 Line -1 of step event in event handler?

    Hi there, noob here. I'm working on a school project (final fantasy styled game) and this error happens on irregular intervals: ___________________________________________ ############################################################################################ FATAL ERROR in action...
  17. Liam Earles

    Variable not set before reading it

    So I was working on a project and while testing, I got a crash bug with an error message saying this: ___________________________________________ ############################################################################################ FATAL ERROR in action number 14 of Step Event0 for...
  18. Alloi

    Question - IDE [SOLVED] GMS 2 Can't Launch Game

    While working on my game everything was working fine; I edited one of my sprites dropping it from approx 10 frames to 3, after doing so my game would not launch. I do not think it is associated to the sprite change but maybe there is something you all know that I don't Thank you for any help...
  19. id07

    Legacy GM destroy instance in other room

    How can I do this correctly? instance_destroy(room5, x, y, obj_overworld_monster_test); I'm making a small rpg type game, and when I have the player run into a monster sprite in the overworld, I had it create a representing monster instance in a different room. I set up an HP variable for the...
  20. M

    GML vanishing point concept with sprite?

    Hey everyone, my name's Jordan and i am excited to be using GM but am having trouble fully understanding all code, or at least writing my own that's more than 2 lines long.I was searching around on this forum/google for some help but had no luck, been creating a game mostly through information...
Top