gml 2

  1. J

    Why is my string no longer a string?

    I have this string in a variable that just suddenly stops being a string for no reason. So I have this object with a string stored in a variable called path_name. This object spawns new enemy objects and uses the given path name to set the pre-made path the enemies will follow. This failed...
  2. P

    SOLVED How can i limit a x and y speed that has separate accelerations

    i' have this code //player movement //accel image_angle = (image_angle + 360) mod 360; xaccel = ((image_angle mod 180)-90)/90*acceleration; var ya = image_angle + 90 ya = (ya + 360) mod 360 yaccel = ((ya mod 180)-90)/90*acceleration; if image_angle < 180 { xaccel = -xaccel; } if ya < 180 {...
  3. mmmmmmmmmmmmm

    [SOLVED] Loop not creating array or list of arrays as expected

    I'm trying to use a for loop to create an array of arrays and I have no clue why it doesn't work. The same problem is encountered if I try to use a DS list of arrays. A reproduction of my code is: var k = 4; var array; var list = ds_list_create(); for (var i=0; i<k; ++i) { var t...
  4. 2D3D

    GML Please help with perlin noise

    Hello I have some code i am trying to implement into my game and I am hoping someone has the skills and is willing to help me get this code running on GML. Thank you!
  5. Y

    Tile Collisions, how can I improve on this

    function onGround() { //grab the layer id var lay_id = layer_get_id("Tiles_1") //grab the tile set id var map_id = layer_tilemap_get_id(lay_id) var grounded = tilemap_get_at_pixel(map_id,x,bbox_bottom+vel_y) var onWall =...
  6. W

    Can I draw_sprite from a script?

    Can I draw a sprite from within a script? I can't seem to get it to work. I know the script is running because I can get the messagebox to pop up. e.g ///@description Makes sprite hover on cursor for placement ///@arg sprite var sprite = argument0; var xx = mouse_x; var yy = mouse_y...
  7. M

    GMS 2.3+ Fast Bezier curve generator (any degree)

    GM Version: 2.3.0 Target Platform: ALL Download: N/A Links: Formula for Bezier curve, My source code (may drift), Vectors, Vector valued functions, Combinations, Pascal's Triangle and Combinations Summary: A fast bezier curve generator. Takes any amount of focus points and returns a list of...
  8. M

    GMS 2.3+ layer_create is called but layers don't exist

    Hello all I am running GML in GMS2 with runtime version 2.3.0.401 and IDE version 2.3.0.529 I am trying to generate a room on startup that is filled with obj_grass objects. I know, I should use tiles, but that is a problem for later. The code creates the appropriate layers and then tries to...
  9. H

    Struggling with "Surfaces" . ( GONNA FREAK OUT )

    I was working on a "digital design software" project on GMS2 and it requires a surface system as a matter of course but after a few failure in this project i've decided to create a brand new document and try learning how "Surfaces" actually work . i have a default room and an object in this new...
  10. xDGameStudios

    GML mp_grid what happens under-the-hood?

    I wanted to ask YYG team or someone that knows this, what implementation is used by the mp grid pathfinding under the hood? 1) A* + normal grid? 2) A* + QuadTree? Is it even A*? I've been looking at some algorithms and wanted to know how can pathfinding in GMS2 can be made better (more...
  11. B

    Drag And Drop (GML explanation works as well) Some terminology clarification and automaticaly reading instance names

    For example inst_36147D42, inst_14B84C93, inst_173083D5, are these the names of the instance, or what are they called if not? For now I'll write assuming they are. If we have multiple rooms, and in each room there are 3 instances of object A, as well as 1 instance of object B, and I want the...
  12. Wendell

    Problem with surface drawing for lighting effect

    Hello. So, I have the follwing code on my light_controller object: if surface_exists(surf) { var cw = camera_get_view_width(view_camera[0]); var ch = camera_get_view_height(view_camera[0]); var cx = camera_get_view_x(view_camera[0]); var cy = camera_get_view_y(view_camera[0])...
  13. O

    check_object_in_viewport()

    I want to be able to check whether or not the player is able to see an npc for a check to speak with them in a king's quest style game. if(object_in_viewport(object_id,viewsize_x,viewsize_y,player_pos) = true) { interactable = true } (this allows the code to continue with actions beyond this...
  14. Carloskhard

    Small Question: What means the red outline in objects in the room editor?

    So I've noticed when using the room editor that if I double click an object a red outline appears around it, and after that doesn't matter if I click outside our change tabs, the outline will continue until I close the room editor and open it again. I know it appears with a double click in as...
  15. Dwighty4000

    GMS 2 GPU Overloading Problem

    I have an adjustable function in my game, which can be used to increase or decrease the "room_speed". This is to allow players to adjust their FPS rate, which works well if you have a fast computer. But if someone now has a weak graphics card and is worth a room_speed because the graphics card...
  16. Lightning Gravity

    GMS 2 Most Important Multiple Step Event Per GML Object Amount

    Okay nevermind. I have just relies your own gml Scripting interface can still add onto your own gml Step Event coding part. As if you by accidentally have done your own Step Event coding part without your own gml Scripting interface coding part, you could of have done the way too much...
  17. L

    Help with Adding Instances to MP Grid

    Hello, I'm working on a simple tower defense styled project. In the room_create event, I establish a default grid for enemies to use, and add some basic objects to be avoided to it: global.nme_grid_ground = mp_grid_create(0, 0, room_width div 32, room_height div 32, 32, 32)...
  18. Dwighty4000

    GMS 2 How can I use the powerfull hardware for my GMS2 Game?

    My game has been online on Steam for a few days and there have been some negative reviews. A review rating was e.g. the problem that with a laptop, the computer does not recognize the game as a game and continues to run the game with the Intel HD Graphics GPU, which leads to strong performance...
  19. Dwighty4000

    GMS 2 How to make Steam Screenshots?

    I tried to incorporate the code from the wiki page but this is wrong when you insert it! What am I doing wrong here and what do I have to do so that I can take screenshots that are then saved on Steam? /// @description Making Steam Screenshot steam_send_screenshot(filename, width, height)...
  20. Cryptik

    GMS 2 Encoding HTTP_POST GML>PHP

    Good day to you, Let me start out by saying a massive thank you to the staff for their product GameMaker and their relentless drive and ambition to keep it going for all the years I've been using it. Feels like it's been over a decade. Thanks for your time keeping a community here too, It takes...
Top