code

  1. E

    Trying to make a wave system using a "Start Round" Button.

    Hello Everyone, i was trying to make a wave system in GM8 Pro for a tower defense game. So i am using timelines and using a code in the sprites but i don't know how to make the start round button becomes green again after i click it. everything works but i can't understand how to do that to...
  2. I

    Question - Code Game freezes

    Hello everyone I was following the tutorial on how to make a 2d plataformer. The thing is after writing the code I rund the game and whenever I touch a wall the game stops and freezes any help would be appreciated. Here is the line of code key_left = keyboard_check(vk_left); key_right =...
  3. Liam Earles

    Windows Down on left analogue stick (Axis_lv) to change instance.

    Okay, so when I change instance by pressing down on both arrow keys, and the D-Pad on the controller, they both work fine. But with the Analogue stick, it's a whole different story. So I have an object that can do cartwheels which moves by changing the instance into a different object when...
  4. J

    Coding Sword animation swing

    Hi, I've been researching (working on an rpg) and found that instead of making hundreds of attack animations would just be easier to animate with code the sword_spr swing. Meaning, just the sword sprite rotating in front of the player's direction during the attack time. How should i approach...
  5. I

    *SOLVED* Problem in my code, can u help me?

    hi everyone, My name is Johnny, its the first time I write on this forum. I'm experiencing some problems on my game code and I hope that someone can help me: since I coded the animations, my character does not move if the key arrows are pressed, while it moves only using space bar (it jumps...
  6. zendraw

    GML Q: Position in an Arc

    how do i calculate a position in an arc for instance point A is at 0 and point B is at 256. now that straight line bends down 32 pixels and creates an arc, and i want to move an instance accordingly to that arc. so far i managed to move it on an angle towards the bottom of the arc, but its again...
  7. N

    Need Code Help

    Hello GMC, could anybody please help me with something. How do you create an object with variable set to that object say for example if the code below existed: key press Z instance_create_var(x,y,item,var1 = 0 | var2 = 0 | var3= 0) This is the best way I can think to explain it sorry :) Please...
  8. darijs1

    Legacy GM xscale & yscale based on distance to mouse

    Since i recently figured out how to auto tile based on an objects xscale and yscale, i decided to try and make my own room editor within the game. My problem is that i cant figure out how the get a perfect object scale from its original position to the mouse Any ideas on how this can be done in...
  9. darijs1

    Legacy GM Auto tile placement, inside an object.

    Im trying to save a couple of seconds of my time, by having an object which would automatically fill itself with tiles. for example: I would put the auto tiling object in my room, and then stretch it across where i want the tiles to fill. I have no idea how to make such a thing, any help would...
  10. I

    (solved)NEED HELP! Out of MEMORY! error

    Hello, I was wondering if anyone could help me understand why i keep getting an "Out of memory!" error This is the relative code globalvar map; mapWidth = room_width/GRID_SIZE; mapHeight = room_height/GRID_SIZE; // create nodes! for(xx = 0; xx < mapWidth; xx += 1){ for(yy = 0; yy...
  11. F

    old code

    Hi, i found some 10 year old code for gesture recognition, and since its free i copied it. one error appears, and its something about a function called : line_distance. apparently this doesnt exist now. does anyone maybe know what this did, and if there is an equivalent function now. in this...
  12. N

    I need help to make a melee combo

    this code for some reason makes the character stop in the same animation of attack for the enterity of the time, i still haven´t implemanted a combo sistem, but i guess you could help me with that as well if (key_attk = 1 && canAttack == 0) {// you can add a "blocker variable" to block the...
  13. S

    Platformer: Stuck on ground, corners and walls

    Greetings. I have been working on a platformer in Gamemaker: Studio. It has controls a bit different from most platformers. being inspired by many games, platformers or not. These games' (Shovel Knight, Smash Bros., Bayonetta) mechanics being fit into one platformer may cause more problems in...
  14. Bokkie2988

    Make a laser head towards a player

    Hello, So I'm making a space game where spaceships will shoot lasers towards a player. I want that once the laser gets created, it automatically heads towards the player, but not exactly. That way the player can still dodge the laser. Can anyone help me with this? -Bokkie
  15. R

    Tabbing out causes keyboard spam.

    Once i start into my game, if i tab out my keyboard spams the keys 'Enter' and 'P'. It also spams new path in gamemaker. I don't know if it spams others yet but those are the only ones I've seen so far. So if i tab out into a text editor it will just spam new lines with P some times in them...
  16. S

    Asset - Scripts External Code Tidy / Refactor Script

    Hey, I always used to code in Autoit3 and they have this feature called "Tidy" that automatically spaces the code really nicely. Since I really liked this feature I wrote my own version for GML. By copying the code with CTRL + C and then pressing ALT + C the script tidies the code. Very useful...
  17. Edwin

    GML How to make turning animation state?

    I want to make an animation state that will turn the player and when finishing it'll changing his xscale to negative. I tried to make it, but always got errors and non working baloney. My animation state system: animIdle = 0; animTurn = 1; animRun = 2; animState = animIdle; My turning...
  18. b38b38b

    GMS 2 [SOLVED] Problem with collision

    I am currently working on a 2D Plattformer, but I have a very big problem: the player cant jump when he is touching a wall, but when hes only touching the floor everything is fine. The wall and the floor are the same object. Here is my code for collision and movement: if (hascontrol) {...
  19. Q

    GMS 2 [SOLVED]Basic Horizontal Collision Issues

    My player character is having problems with approaching my "wall" objects. As he gets closer to them he starts to blink and spazz out and then gets stuck inside the box and disappears. Here is the code I am using for the collision if(place_meeting(x+hz_mv,y,oWall)){...
  20. Q

    GMS 2 [SOLVED]New to GMS

    I am new to GMS as in I have less than 24 hours with it. I am simply trying to go from an idle animation to a run animation and back. I am using Spine Pro for the sprite animation. Anytime I move my sprite it just freezes. If I understand correctly it is because every "tick" it is restarting my...
Top