scripting

  1. A

    GML Speeding up cutscenes/gameplay event coding

    Hey guys. I'm making a game that is based on missions, during which I have to control things such as enemy behaviours, dialogues, cutscenes, ecc. Hello :) I am making a game that has alot of missions and cutscenes. The way I code them right now is by having the main mission script with a...
  2. P

    GMS2.Issue with moving circles collision

    I have an issue with collision checking of circle instances, actually it just doesn't work and collide_object=noone in any case, also importatnt thing is that i don't know why but x always= chobj.x Important thing:Object doing this script is also a child of Pobj_circle So this is my GMS 2 script...
  3. Dwighty4000

    GMS 2 camera view in new rooms?

    I have a game with a limited camera view that tracks only the player. What do I have to program if I want to enter a new room and the camera should follow now follow the player in the next room along?
  4. Dwighty4000

    GMS 2 how to control the object foreground

    How can I change the foreground priority of objects during the game with programming commands so that this optical error on the characters (see picture on the bottom) can be avoided? It should somehow be possible to distribute the foreground priority with codelines, so that in this case the...
  5. Joe Banko

    GMS 2 Seeing syntax examples

    Hi all, How can I see examples of scripting instead of Drag & Drop examples in the manual? Is there a help switch to show GML versus D&D? Thanks, Joe B
  6. Vṛka Majjā

    JSON and GML

    Hey, I'm unfamiliar with JSON and its uses alongside GameMaker Studio 2. I want to know. Anybody have a good place to start?
  7. Wreathesent

    GMS 2 Script that returns a value returned from an object

    Hi GM community :) Here's a thing I need a bit of help with, and if I can pull this off I'll most likely never have to ask something here again (i know you're all tired of me at this point) Anyway I need a script that returns a value from an object. For example, let's say I wanted to ask the...
  8. J

    Windows SOLVED (Invincibility - Asteroid)

    Hello folks. I've just started with GML. Currently running trial for testing. I have been following Shaun Spalding' s tutorials. - im at the last step. Since this tutorial is in GM1, I had to do some modifications especially with instance_create. Anyways. When I follow the guide for making...
  9. royer14

    GML difficulties when creating player that shoot

    Hi, I have difficulties creating a player to shoot, I have taken a course on the internet and decided to use the code and implement it in my source, but I have lost, can you check the code and say where can I place the said action? Object Player event create ///create event spd = 8; acc...
  10. J

    Moe Keno

    MoeKeno is a Keno game I created way back in version 7 (non studio) of Game Maker. Today I finally got it working in Studio 2. The screenshot is from the former GameMaker 7 Professional but it still looks exactly the same. I am not a graphics artist so it has basic graphics. The game is...
  11. J

    GML Optimising a Tile Conversion Script

    I have written a script to convert a tile layer into an instance layer. The 16x16 tiles are converted into three different types of objects and a selected image index, acting as a precise collision map for the player. This form of collision map building is relatively simple and speeds up the...
  12. Calyston00

    [SOLVED]Wander behavior script

    Hi all! I got a little problem, I got a wander behavior script that if I call it in the step event of my monster doesn't work. If i do the same code (the whole script) in the step event of my monster it's work fine! The timer var doesnt go down in my script one know why ? Here' is my script...
  13. XirmiX

    GML Is parameter-based scripting at the expense of some performance?

    With scripts, you can essentially create functions of your own in a way. I've thought of cool ways I could re-use some portions of my code instead of writing it all down to execute in one block. But isn't this at the expense of some performance? I know that GML itself is probably some-what...
  14. M

    Drag & Drop / Scripting

    Hey all, I'm a newbie to GameMaker and I'm just planning out my first game. I do have some programming experience but was going to start prototyping in the drag and drop editor before fleshing out with GML (once I have learned the nuances of the language). My question is if I start this in drag...
  15. P

    GMS 2 Inventory problem (SOLVED ... cos I'm an idiot lol)

    Hello, it's me again. I'm making an inventory system. It's not working very well. Here's the code for it, starting with the inventory creation object create event: /// Initialise variables globalvar invsize, invwidth; //establish global variables invwidth = 1; // width of inventory invheight...
  16. YellowAfterlife

    Asset - Extension Apollo - use Lua code in GM games! (Win/Mac/Linux)

    Marketplace link: https://marketplace.yoyogames.com/assets/5192/_ Interactive demo: https://yellowafterlife.itch.io/gamemaker-lua Documentation: https://yal.cc/r/17/lua/ GML->Lua converter: https://yal.cc/r/17/lua/gen/ Blog post: (coming soon) Price: USD 14.99 Modules: Windows, Mac, Linux...
  17. P

    colour coded scripting (SOLVED)

    Hi, I'm new to Game Maker, I'm using Game Maker Studio 2, free trial version. Is there anywhere that explains what the different coloured expressions in GML mean? I've been wandering around the website for ages and haven't found any explaination of what the colours mean.
  18. SayBaconOneMoreTime

    How to add argument names to the autocomplete for a script?

    Hi there, So I as I start writing scripts to set up mob properties for this game dynamically, I realize that I will never be able to remember all the properties for different entities in the correct sequence to throw them into the script without going back to look. I realize there is a way to...
  19. P

    GML Erase Pixels Ingame?

    So I've done a bit of google searching and couldn't find an answer, sorry if this has already been covered somewhere. I need to erase pixels on an object's sprite in game with another object. (the pixels touching "another object") I have sort of a complex game mechanic based on this being...
  20. H

    Changing object depth for player to move around the object?

    I'm trying to make my character sprite go in front, but also behind both of the planter sprites. They are currently set at 0 depth, whereas my player is set at 1 depth. How do I change the depth of the planters depending on where the character goes?
Top