script

  1. A

    SOLVED Array out of bounds error

    got the error while executing my code for my card game code error: ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Step Event0 for object obj_deck: Push :: Execution...
  2. William Garrison

    GMS 2 Different Fonts in same string?

    Hey guys and gals, Im trying to figure out how to possibly get two different fonts in the same string with a script. Below is the script I set up to try and accomplish this. But obviously doesnt work. How can I make this a thing? Why do I want to do this? Well I wanted whomever is talking...
  3. M

    How to script a smooth jump animation in a platformer?

    Hi! I was watching the tutorials for a 2d platformer. All of them were teaching simple jump animation with one or two static frames. one static frame for ascending and one for falling. It seems the tutorials areteaching 8-bit era jumping. I have no idea how to implement a 16-bit era jump...
  4. Binsk

    Asset - Scripts UBG Strings

    Yoyo Marketplace (coming at some point) Itch.IO Upset Baby Games View the online documentation to explore the available functions. Would you like to expand upon the available string functions included in GameMaker? This extension does just that. The added functionality ranges from small to...
  5. S

    GMS 2 GMS 2: cannot change local variable???

    I wrote some code for checking if a given location is valid for building things, using local variable "_output" as accumulator; however, my attempt to update the accumulator in a with() loop appeared to have no effect. ///@arg build_x ///@arg build_y var _output = true; _output = _output and...
  6. FoxyOfJungle

    SOLVED "for" statement problem... (trying to make a dialogbox)

    Hi. I have a ds_list, it contains dialogs for my dialogbox. How I make: CREATE: messagebox_list = ds_list_create(); messagebox_show = true; messagebox_n = 0; ds_list_add(messagebox_list,"The quick brown fox jumps over the lazy dog"); ds_list_add(messagebox_list,"This is a long history...")...
  7. Akhos

    GMS 2.3+ Question regarding Object Order and script_execute in GMS 2.3

    (I'm not currently in the beta so I thought I'd pose the question here, hopefully someone can help me before the official release!) So in my current project (a fighting game), I have the ability to save replays and play them back. I have a fast forward feature that lets you play through the...
  8. Pixelated_Pope

    Asset - Scripts Top-Down Movement & Collision - Object Based Collision System with Single Script Implementation for GMS1 & 2

    There's an in-browser playable demo that supports Keyboard and Controller input for testing purposes. This asset has been out on the YoYo marketplace for a LONG time now, but I just recently created a new update that has better support for walls of all angles (rather than just 45 degree walls)...
  9. Nathan

    SOLVED Please delete, did it an entirely different way

    I am trying to find (or write) a script or some code to make an asset layer flash like lightning. I'll be putting white squares outside windows of the stage, so I'd like to turn the opacity of the layer either on/off or real fast slide of the opacity scale to simulate lightning flashes. My...
  10. zendraw

    Lost assets retrival

    i deleted a script now how to get it back? does game maker 2 has any backup folder or somthing???
  11. S

    GML How to put piece of code in a variable or argument?

    Hello, I am trying to put some code into an argument of a script how can I do it? This is how I want to call the script: change_script(1, 2, global.military_point = global.military_point + 3, global.economic_point = global.economic_point + 3); This is inside of the script: var unique_id =...
  12. FoxyOfJungle

    GMS 2 I have found a way to HACK HMAC hash Encryption

    I was recently looking at a safe way to be able to save the file without a regular user being able to modify the gamedata. So I made a system that works as follows to save the game safely: 1 - Save variables in a "ds_map" 2 - Save ds_map as JSON 3 - Save the JSON string to a buffer with byte...
  13. FoxyOfJungle

    SOLVED Stop running a part of the step event?

    Hi, I'm making a Clock and in some part I need to "stop" executing a part of the code, note below, every dn_phase == "anything", I need to execute what is inside only once, because the "clock_bg_fade_alpha" needs to be at "1" only once. I've tried using boolean, but I couldn't do it efficiently...
  14. RedKnight91

    Question - Code Mismatching script indices

    Hi, I'm looking into Game Maker Extensions. I've made a few assets so far but I've never turned them into an extension before, so I want to up my game. I got familiar with the whole procedure, but right now I'm hitting a weird behavior.Here is my setup: * I have a project with ~98 scripts in...
  15. Christopher A. Orestis

    Not collision with var = Do something...

    Hello, I would like to know how do the following: (This script is not working, would like to know how to fix this) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// var...
  16. FoxyOfJungle

    GML [Solved] ds_maps: How to save/load the room with instances?

    I am making a customizable game where the player will have to build a mall. How do I save all instances of 2 different objects and also save global variables such as score and others (All in the same ds_map)? I need everything to be saved in a ds_map and then use ds_map_write () Save/Load Code...
  17. sinigrimi

    GMS 2 [solved]removal from instance_create script if the object was destroyed

    Hello! When I enter the room, it reproduces the blocks, but when I move to the next and return to the first, nothing is reproduced in it :( p.s .: rooms are not from GM but are generated in the same GM Room after moving outside the camera. I would also like to know if I can mark these objects...
  18. sinigrimi

    still have questions about ds_list(I'm sorry that there are a lot of questions, I'm really a noob)

    but I have very, very many lines with creating objects. how can I effectively add them to ds_list. or maybe there are other options? I have a script in which there is the following: in the controller the following: in the scripts are switch systems in which everything is indicated in a...
  19. sinigrimi

    GMS 2 [solved]One more question

    This is a create event and when I run the compiler it says that room_type is not set. also if I directly insert a digit into the argument field, the code works. var room_type =5;//irandom(559); case"fixed": // if (up == true) and (bottom == false) and (left ==false) and...
  20. S

    [Solved] Help. I need help with a script.

    Help! I need to get a script done by tonight. I'm in a school club where I have to make a video game. Well, anyway. I have to have 3 levels on my game. It's a game where to click on objects that fall from the sky and you get points. (Stored in a variable name your_score) So, I tried to make a...
Top