gml

  1. JeanSwamp

    Vertical Parallax Scroll Desperate help

    Hello, I am having issues trying to make my vertical parallax look good and I am looking for ideas and suggestions. Obviously scrolling a vertical parallax with layer_y(layerid, camera_object.x *0.5) and stuff like that won't work for big rooms. I currently use this: var _ypos =...
  2. V

    Legacy GM Snapping to grid after panning with view enabled

    Hello, After a long time I wanted to start Game Maker programming again. However, currently, I have a problem with combining view, panning and drag & drop in GML. The project can be found here. When you start it, you will see some buttons on the right. Without panning, it is possible to drag...
  3. Jaysin

    SOLVED Need help confirming a possible bug

    Hi, I'm Jaysin, I've been using GMS2 (IDE: 2.2.5.481 /// Runtime: 2.2.5.378) for the past few weeks after having initially tried it 2 years ago. I enjoy it a lot, but I've come across an issue that I'm concerned may be a bug. I'm getting a crash in the GMS2 Runner and when I build a Windows...
  4. L

    image_xscale not working for jump-through platform

    I have this line that should change the xscale of the object: if (hsp != 0) image_xscale = sign(hsp); When I use it, nothing happens. So after shifting the location of the code in Step, everything remained the same. Eventually I just wanted to try out how image_xscale works so I put in this...
  5. netoxinaa

    SOLVED Problem with Tile Collision in a platformer

    I'm trying to build a platformer with few help as possible (for learning purposes). I didn't want to use object collision with the player even though it's easier, so I preffered using tile collisions which are more faster. But when I implement my collision script, it just locks the player's...
  6. netoxinaa

    SOLVED What does a * mean in a Script's name?

    I've looked around in the documentation but I can't find the meaning/purpose. If somebody knows I would appreciate the info :)
  7. kureoni

    GML help me with this holy collision code

    so, in my game, there is mobs that follows you once they are spawned, but since these mobs' angle always face the player position, sometimes they turn their angle and the collision box of the mob gets stuck inside of the collision box of the wall and sometimes, inside of the collision box of...
  8. Z

    GMS 2 Basic GML, names of build in variables, and How To make some things in GML that I already know how in DnD

    Hello there I'm just starting with GML so there are many things I don't know, but I suppose it should not be so hard if I already can make many things with DnD This is are the things I want to know: .How do reffer to the "key A"? I know that for left or right you use vk_left or right, but if I...
  9. Z

    GMS 2 Animation in GameMakerStudio2 basic GML

    Hello there, I've been watching some Shaun Spalding videos to make a platformer, but my character needs additional animations like Starting to walk,inbetween frames for jumping and falling, turning and landing animations. I know how to add that in DnD in Game Maker 8 but I'm just starting with...
  10. U

    SOLVED Subtract a specific word from a string

    Since I used enum item{} to make an inventory, the item names in the inventory are prefixed with "item.". I want to reap only this name. Because you have to create an objname for instance_create() so that the character will drop the item you used. I want to create "item_draw" this time, but the...
  11. U

    SOLVED Get/Do not get items

    Hello. I created an inventory that contains up to 4 items, referring to the blog here. Pressing the Enter key on an item removes it from the field and puts it in your inventory. Now, let's assume that four items are filled. This script finds a place where you can put an item and returns true if...
  12. descrubb

    GMS 2.3+ array_value_exists - check to see if a value exists in an array

    Is there some already-in-place function that could replace this custom method? I couldn't find any in the 2.3 docs... ///@desc returns the number of times a value appears in an array ///@arg array array to search in ///@arg value value to search for function array_value_exists( array...
  13. kureoni

    GMS 2 temporary buffs

    so, in my game there is a store and you can buy buffs, such as movement speed increase buff etc. right now, when you buy the buff, you gain extra movement speed, but it needs to end after some seconds, but i'm not being able to program that. so, there is an object in the store and when you...
  14. U

    SOLVED About memory leak

    About memory leak I'm using two ds_grids of about 2 rows and 4 columns to build an inventory. So, just getting four items will slow down the game. Other than ds_grid, I made only that extent that the instance will be erased if you move the character or press the enter key in front of the item...
  15. U

    GML Objects corresponding to camera coordinates move slowly

    Good evening. I keep the location by making the inventory below track the position of the camera. However, when the character moves, it will move slightly because it will be slightly delayed. I filled in each of step, endstep, and beginstep, but it is still late. How can the inventory be...
  16. U

    SOLVED I want to make the enumerator correspond to the item sprite

    Hello. We are making an inventory. The image is a picture of the item used for inventory. I draw a picture every 64 pixels. I want to use draw_sprite(); according to the order of enumerators below. How can I make this sprite an enumerator? enum item{ none, draw_set, mirror, ball_w, ball_b...
  17. JeanSwamp

    Vertical Scrolling Parallax Issue

    Hello, I've been tweaking my camera every now and then because after adding new features to it, I might run into new problems. Currently I am having issues with the vertical parallax scrolling my layers. This is for a 2D Sidescroller. This is how I am scrolling the layer_y var _ypos =...
  18. U

    SOLVED I don't understand the code argument0

    Hello. I read in the article that general-purpose processing can be called at any time。 引数と呼ばれるコードについて学んでいます。公式のウェブサイトや動画など、このコードについてはたくさん見ましたが、まったくわかりません。このコードは何のためにあり、それは何をしますか?このコードがなければ何が不便でしょうか? thanks
  19. D

    Problem with multiple choice questions

    Hi, yeah so I've been trying to get some multiple choice questions into my game. The thing it's supposed to do is 1. pick a random question 2. pick four random answers where one of them is the correct one, it shouldn't be choosing two of the same answers. But that's, unfortunately, the case...
Top