functions

  1. Cupid Stunt

    GML [Solved] Data structures of objects, message passing, and multiple collisions

    I'm new to GMS2, but I have 34 years programming experience, including 4 years video game programming. IDE v2.2.4.474 Runtime v2.2.4.374 I watched all 4 of the 1st game gml videos on youtube and made the game along with them. I've been searching the forums and the docs on yoyogames. I've...
  2. P

    Passing 2 argument with one DS

    Hello Everybody! Im new to Gamemaker 2 so and programming at all so i dont know if there was a way to pass 2 arguments in function with ONE data structure(of any type). I mean imagine for example that you have to create an object with fixed X and Y coordinates that are always same, but is there...
  3. Kezarus

    Asset - Project Free Asset - Monastery Framework

    Monastery Framework OBJECTIVE Create a framework project on GM2 that have some useful functions, GUI elements (buttons, panels, containers), basic Options menu, start Ini files that houses preferences, the basic setup for music, sound and particles. DESCRIPTION Ok, I will have to do something...
  4. syscall

    GML A way to extract all GML (builtin) functions' metadata?

    Hello, I have been working out on the SDK for Windows DLL extensions... It is going great. But, I do have a question, is there a function in GML which would return a (big) map data-structure, a value containing all builtin GML functions' metadata (information about the function signature...
  5. Fixer90

    GMS 2 Script with Unlimited Arguments?

    I am mostly aware of how GML's script system works — with arguments and whatnot. However, I am curious as to if there is a way to make a script with no limit to arguments, similar to some built-in functions in GML (ex. ds_list_add). Is this possible?
  6. Suzaku

    GMS 2 Useful functions for the Draw Event

    Im starting to learn how to use the draw event to draw everything in the game and I would like to know some of the most common and useful functions that are helpful to work with the draw event, not only "draw_" functions, I want functions like something to get the borders of the drawn sprites to...
  7. EvanSki

    Why is there not a font_get_range?

    Why is there not a function that gets the available range of a font? For example, you have a font (fnt_arial), with a range of 65 - 68 so the available characters from the font is A,B,C,D Now imagine your making a user text input system or just want to see if a font has the character in it So...
  8. T

    GML Functions within script

    Hi all, Is it possible to split your GML scripts into functions? for example I have a piece of code like this: // Jumping if (place_meeting(x, y+1, obj_wall)) && (jump_key) { vrt_speed = jump_power; } // Horizontal Collision checking if (place_meeting(x+hoz_speed, y, obj_wall)) {...
  9. A

    Buffer confussion

    Hello! I've been using buffers to save / load huge amounts of data, to cut the long story short this is the save code: var _cmp = buffer_compress(_data_level, 0, mw * mh * REGION_SIZE); buffer_save(_cmp, string(level_name))//+ "|*.mle")...
  10. lord_berto

    GML Aren't variables supposed destroy themselves?[solved]

    Ive used game maker for about 8 years now but haven't really used the debugger ever. I recently started using game maker studio 2 and have a few things that are making me go wtf. so I fired up the debugger and when i pause to check my local variables, i can spot variables that were created in a...
  11. 3

    Shaders How Much Can the GPU Handle in 3 Dimensions?

    Relatively quick question, in the process of drawing 3d models i normally, map out a .obj file to their corresponding; v (x,y,z) , vt (u,v,w) , vn (i,j,k); vertex position in 3d space ,xyz, vertex texture in 2d space with w for mapping ,uvw, and vertex normal for lighting ,ijk,. I've gotten...
  12. Azenris

    GMS 2 [Solved] tileset_get_name and tilemap_frame

    Hi, dunno where to post this, but I was needing some functions. I wasn't sure If there are other functions that act the same, if they were missing, or soon to be coming. tileset_get_name : retrieve the resource name of a tileset index Needed some same reasons as sprite_get_name...
  13. HayManMarc

    [SOLVED] Function works; x position variable off.

    Hello, it's me again. I tried to put this code in a script so I could make my own 'region' ( and make that region easier to define), but it doesn't produce the effect I know it's making contact because other code works (for example, reduced hit points). No errors, but no particle effect...
  14. I

    GMS 2 Calling Python Functions

    Hello everyone! Would there be a way to call a python function at runtime and somehow process its output?
  15. Fixer90

    Legacy GM Rotating tiles with code?

    Title says it all. Can tiles be rotated with code, even unconventionally? var ground = tile_get_ids_at_depth(1000010); for(var g = array_length_1d(ground), n = 0; n < g; n ++) { tile_set_rotation_oh_wait_this_function_doesnt_exist_darn_it(ground[n], choose(0, 90, 180, 270)); } NOTE: This...
  16. Shadowblitz16

     please add way to do the following with tilesets

    please add a way to do the following with tilesets.. get_width(); get_height(); set_sprite(); get_sprite(); these are very useful and allow the programmer to NOT build his editor around magic numbers and switch out tilesets at run time.
  17. psyke

    Discussion Object Functions (Suggestion)

    So, I was looking into the ROADMAP page, and I saw this: I was thinking, wouldn't it be better if we could add and manage as many functions as we want into a separated menu inside the object editor? I made an image on Photoshop to illustrate what I'm talking about: There could be a button...
  18. Z

    Legacy GM [SOLVED] variable = function

    I'm beginning my endeavor into networking and have been coming across many a code containing something I don't entirely understand and have been unsuccessful in finding a definitive answer to. When defining a variable as a function, what is it being set to? Is it coming up with a value that I'm...
  19. Erayd

    Android / Amazon Fire display_get_orientation()

    I'm wondering if anyone has used this function in android before? I was going to use it as a work around for an error I ran in to when using the GoogleMobileAds_Removebanner() function. That function caused the game to crash so I decided to just move the banner around instead of creating and...
  20. F

    How to import an extension package and MAKE IT WORK?!

    Hi. I downloaded an extension for playing videos in my game (since the developers were smart and decided to remove the splash video function). In the extension, there was only a .gmez file, so I opened it in gms in the asset called "Extensions"... now what? I saw a few tutorials on...
Top