function

  1. xDGameStudios

    Asset - Scripts [BUFFERS] xBufferFunctions is a collection of advanced buffer functions.

    [LINKS] https://marketplace.yoyogames.com/assets/9587/xbufferfunctions https://xdstudios.itch.io/xbufferfunctions [INFORMATION] This asset is composed by a set of buffer functions that allow for complex buffer parsing. Functions allow to seek and match patterns, copy regions (using read...
  2. Arilyn

    Variable <unknown_object>.instance_create() not set before reading it.

    Hello, I'm pretty new to game maker but I've messed around with Unity a lot in the past. I've hit a roadblock and haven't been able to figure out why I'm getting errors despite researching and reading the documentation, but it's probably because I don't quite understand how GML and scripts...
  3. W

    Can't assign a return to a variable

    I made (borrowed) a script for drawing buttons to gui and it works perfectly, except I cannot seem to assign a variable to the returned value. Here is the script: /// @function draw_gui_button_sprite(sprite, index, x, y, width, height, main_view); /// @param {index} sprite The sprite to...
  4. The_Scientist___

    draw_rectangle() Problems with Transparency

    I'm trying to make a textbox that appears when the mouse hovers over the object, and I'm drawing a rectangle as a backdrop for it. However, if the object is far enough to the right, I want to make it draw in the opposite direction, but when I do, it turns semi-transparent and draws behind other...
  5. FrostyCat

    GMS 2.3+ IMPORTANT!!! GM 2.3 Users Please Read! Improper script usage generates undefined variable errors

    Symptoms to Look For Expand for screenshot: The error is in the Create Event for object <undefined>. The subject is <unknown object> with a variable name that's either built-in or known to be already declared. The stack trace shows the source as something starting with gml_GlobalScript. For...
  6. ZacKow264

    SOLVED Opening windows in code?

    Simple question, is there a way to open new windows in code? Like a second window for the game? What are the limitations of this, if it's possible? Does anyone know? This would be in the actual game itself. So I want to basically open another window automatically while the game is running. Is...
  7. D

    GMS 2.3+ Nesting functions

    Hello, I wonder if this is a bug or not... func_1 = function(){ code } func_2 = function(){ func_1(); code } When I place this in a create event, it calls the func_1 code without me executing func_2.... Is this a bug or is it not allowed to nest functions like this? Im...
  8. Gorshalox

    How to play once the animation of die before function( game_restart(); )

    I'm making 2d platformer in GMS Language. I've a varibale "hpHero" and i did like " if hpHero=0 { game_restart(); } but I need to play the animation of die before game will restart,pls help me
  9. FoxyOfJungle

    GMS 2 [SOLVED] zip_unzip() - How to save in a different location?

    The new version of Game Maker Studio 2.2.3.436 lets you disable the engine sandbox, this works with the "file_" functions, but doesn't work with zip_unzip(). Is there any way to extract a zip to any location outside of "appdata"? I'm basically doing an update system, and I need to extract the...
  10. S

    GMS 2 Is there SDK or a hack/way to call GML builtin function from external side?

    Hello, This would be my second post (as well as thread) :) The title pretty much says it all about here. In my previous thread, I have talked a bit about my first extension (in my first game built using GameMaker). So far I have been able to call external functions from GML scripts. Our...
  11. S

    GMS 2 Suggestion: Calling convention option for external functions

    Hello, I am very new to the world of GameMaker, I have just started using it since last week... But, I am fairly experienced in several of other programming languages (such as C++, C#, JavaScript). That being said, I am the one who prefers object-oriented programming. So, I started to learn...
  12. D

    GMS 2 Does GMS2 allow to create custom functions?

    Hi! Can't find the info about custom functions inside my scripts or events. Is there any possibility to do something like this? switch(item.type){ case "weapon": func_do_something(); break; } func_do_something(){ //some code here }
  13. EvanSki

    GMS 2 [Solved]How do I do the script @param stuff?

    I want to start messing around with the @params like this /// @Description A test of the params /// @param Object /// @param x /// @param y /// @param count scr_testparam(obj_enemy,256,145,69) But what I want to know is how would I use it with the Built in variable (argument0-15) I'd love to...
  14. Architheutis

    Strange random-behaviour

    Hi Folks, On running a code like this, ALWAYS results "6 Knifes". It only changes by adding or deleting one or more weapons. But after changing the ammount of the choice, the same weapon is shown again and again. CasualWeapon_ = choose("Crossbow", "6 Knifes", "Hellbarde", "Warhammer", "10...
  15. V

    [SOLVED] Call external function in DnD

    Hi, I'm newbie programming in GMS2, really I'm using DnD. I've finished my first game and now it's time to distribute it. I'm going to publish it in BLUR app. This really needs very few steps for integration: 1. Place this rcode before the end of the </body> (closing tag) in “index.html”...
  16. E

    GMS 2 Need Help With "draw_set_halign()" Function

    I'm creating a simple inventory screen for my game in its own room. The room currently only has two objects that possess draw events (to clarify, there are other objects in the room, these two are the only ones that use the draw event). The first object, called "obj_inva1amountcounter" counts...
  17. N

    Discussion can we have function like variable_global_get_name()

    Can we have variable_global_get_name() *function that gets name of all exist global variable in the room as an array of string I am trying to make debugger and already work around another similar function like variable_instance_exit /get_name /get /set which goes pretty well but when work around...
  18. 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...
  19. T

    modular variables?

    Hey guys. I was wondering if it was at all possible to create modular variables in our scripts... Which I guess are kind of like arrays? Here's an example of what I mean: Var mod = ”” Var [mod]dog = 0 Var breed = 1 If (breed = 1) { mod = ”bull” } else mod = "lab"...
  20. zendraw

    Windows [SOLVED]Q:Display color values

    Hi, does some1 know how can i get to display the hex value of a color? Do i have to create such a script myself?
Top