programming help

  1. M

    Abstract

    Is there a way to declare abstract variables for strategy pattern use in superclass objects? I'm working on a version of pac man, and I want to have a strategy pattern for ghost AI, but I need to be able to declare an abstract variable to later be assigned a specific targeting method in the...
  2. S

    Programming orbital paths

    Basically, I am trying to make a game where you shoot a missile around several planets, and you have to use the planet's gravity to get your trajectory right. I need to know how to program a system where I can simulate planetary gravity while allowing the player enough leeway that they don't...
  3. V

    GMS 2 Wall Jump Collision Issue

    Hello I'm new to gamemaker studio 2 and lately i've been having issues with implementing a wall jump feature. In this piece of code, the object player, as it slides down the wall and once i press the jump button, jumps and when its near the wall it seems to stop mid air. How do i prevent this...
  4. A

    Having issues with collision in platformer

    Hello, I am having issues with this platformer I am working on. Code is below but basically. I am having troubles with the player character getting stuck on the side of the platform or I get the issues as shown in the attached GIF image. I have been troubleshooting it for 3 days and havent made...
  5. A

    GML Knockback Effect Help

    Hello I was working on my knockback effects in this game I am just getting the player mechanics done before adding any thing else. But I ran into a problem. The entire script will be below and the link video to give a visual to what my problem is. Now if you look at the video it looks as if...
  6. mizzy

    GML var question

    Hello Happy Game Makers, I have a very noob question for you (was unable to find on my own): When I declare a variable.. do I have to write var before it? ex: var thingy = 0; or can i just write: thingy = 0; as far as I can tell they do the same thing, but I am very early on in my project...
  7. U

    I need help destroying only one instance of many

    So I have a tree harvester game where you click trees to lower their health to 0. When it hits zero, I want the one tree to be destroyed with x amount of logs to spawn. When I run the following code, all of the trees destroy after 1 click. obj_oaktree - Create event image_xscale = .5...
  8. Aleksander

    GMS 2 Resolution changing with font

    Okay so my resolution changing is working but font is blurry when higher resolution How can I solve this problem? HERE IS THE SCRIPT switch(argument0){ case 0: window_set_size(800,600); break; case 1: window_set_size(1024,768); break; case 2: window_set_size(1280,800); break...
  9. Rafael Apolinário

    Flinch effect (knockback when player takes damage)

    Hi there! I am new on Gamemaker Studio 2 and been following Shaun Spalding's youtube videos as I wanted to make my first platformer game. My obj_Player moving system looks pretty much like his: var move = key_right - key_left; hsp = move * walkspeed; vsp = vsp + grv; x = x + hsp; y = y + vsp...
  10. E

    Question about setting up a create point for shooters

    Hello everyone. First time poster and aspiring developer. I've been doing the tutorials and got as far as the second one with the top down shooter tutorial. My question is how can I place the point of bullet to be offset from the center to make it spawn/create from the barrel of the gun. The...
  11. H

    SOLVED Debugging help

    Howdy! I'm having trouble understanding what's happening with my code. So, I got this error message: ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Step Event0 for object...
  12. A

    SOLVED Walking Animation Trouble

    So I am fairly new to Game Maker and I am learning to code as I go, making my first game. I am currently making the walking animations for my main character sprite. When I make my sprite walk forward, the animation plays fine, but when I try to move my sprite left or right, the animation for it...
  13. A

    Windows Wall jumping has sudden stop without acceleration.

    I followed Shaun Spaldings tutorial on Wall jump & Acceleration and after learning a few things and typing it out it works except for one part, when wall jumping off a wall you go horizontally but have a sudden stop and fall straight down, if you could give me advice or help that would be...
  14. Jmarlin3

    Game not running.

    When I click the run button, the last prompt that appears is: [Run] Run game Options: Z:/walljump_72F3F265\MainOptions.json X://windows/Runner.exe -game "Y:/walljump_72978DC5_VM\walljump.win" Attempting to set gamepadcount to 12 DirectX11: Using hardware device Total memory used =...
  15. Jmarlin3

    How to do dash ability

    I need help creating a dash mechanic for a dash ability. Similar to the game cleste: I'm not entirely sure where to start, but here's my player's create event that was based around a wall jumping mechanic: hsp = 0; vsp = 0; hsp_frac = 0; vsp_frac = 0; hsp_acc = 3; hsp_fric_ground = 0.2...
  16. jwrose

    Trying to get a special jump behavior

    Hello! First time posting- I'm working on my first game in GameMaker after doing tutorials. I'm trying to make a somewhat unique jump behavior where a tap does a fairly normal gravity based jump and holding makes you go up a bit more (like a double jump) but then I want the y value to remain...
  17. NimNom1234

    Character movement continues while attacking

    Hello. I have a feeling that the reason for error is something silly, as this is a pretty basic part of a games programming, but when my character attacks, he can still move freely, despite my efforts. I was fed up with platformer programming, so I caved and used Shaun Spaldings code. In the...
  18. Jmarlin3

    Issues with instances and if statements

    So the player object is supposed to cross over a floor object, with the floor object switching to a red floor object. If the player object is not touching the red floor object anymore, the red floor object dissapears and turns into a wall object, meaning they can't go back.the Here's the code...
  19. Jmarlin3

    Help with objects touching - Disappearing floor

    The idea is that when the player is touching the floor, it turns red. However, when there are multiple floors, so if the player isn't touching it, I will go away. Code for floor: Step Event if !place_meeting(x,y,obj_player){ instance_create_layer(x,y,4,obj_redfloor)...
  20. A

    NEED HELP FAST (Thank You)

    Hi all, I'm fairly new to Gamemaker and I need help with a small problem I'm having to do with some variables. I have 2 different integer variables: global.money and amount. What I am trying to do is take away the amount variable integer from the global.money integer when I click a button...
Top