scripts

  1. ZacKow264

    SOLVED Variables no longer coloured or showing up in Code Completion

    There should be an image attached to show what I mean. Instance variables, local variables, and custom scripts no longer show up for me in their assigned colours. And yes, I checked my preferences, and nothing has changed there. Additionally, none of those show up in Code Completion either...
  2. William Garrison

    GMS 2 Cleaning up my Dialog to a script

    I have the dialog system working. I couldnt be more excited. I know its trivial to most, but I am awful at this. Anyways... In my step event I have this... (next is a variable that is defining what txt[] I am currently on) sc_cs_dialogStart(); txt[0] = "Im the Player"; txt[1] = "Im the second...
  3. D

    Best practice for state-based game design?

    Working on a strategy game. Right now, what I've got is only nominally state-based. There's an "initializing state" that lasts a few frames at most upon startup, and then you're thrown right into a gameplay demo (just able to move units around really). Obviously I'm gonna want menus to select...
  4. P

    SOLVED How to Update Function Description and Arguments???

    Hello Everybody, I have met the problem while trying to remake some of my functions in GMS 2.3 . I had 6 different scripts for converting coordinates to isometric like in Shaun Spalding's tutorial. Then I decided to use new feature of GMS 2.3 and collect functions from those 6 scripts into 1...
  5. G#m_Player2

    GMS 2 Problems with Melee Attack after killing enemy and enemy (2)

    Hello GameMaker Community, I recently have a problem in my melee attacks. I watched Shaun spalding's melee attack tutorial together with my other knowledge with his other videos about attacking enemies and parent objects but I may still have a lack of coding knowledge and I want to learn more...
  6. flyinian

    SOLVED Would this be 1 or more than 1 script?

    I've been learning how scripts work and was wondering if the below code can be placed into one script or i will need multiple scripts for it to work. My guess, I need multiple scripts. if (Requirements_Met == true && Allow_Leveling) { if(Current_Experience < Next_Experience) {// If...
  7. TomOmNom

    GMS 2.3+ HELP! Looping through arguments and checking them against each other

    New to GM, sorry. I'm trying to make a script that can take all arguments, put them into keyboard_check functions, and see if they are all being pressed. I'm not sure how to check if all of them are being pressed. So far I got for(i = 0; i < argument_count; i++) { if...
  8. danielpancake

    Free gmdungeon - a dungeon template creating asset for GM:S

    gmdungeon is a dungeon template creating asset that can be used in any kind of project requiring dungeon generator. It's easy to use 👆 Download and examples: github Price: Free Installation proccess For GameMaker: Studio 1.4 Drag all scripts from src/scripts folder into your open game maker...
  9. EvanSki

    SOLVED Can scripts have children?

    If a mommy and daddy script love each other very much- no. I want to know if i could make a script act as a parent and have another be a child of that parent script and inherit code. in other languages you could just call that script for a different one or like papyrus you can just have a...
  10. JapanGamer29

    GML Need help with script name as variable

    Hi guys. This is a simplified version of what I'm trying to do: var menu = "audio" var save_script = "scr_" + menu + "_set_and_save" script_execute(save_script) But I get this error because save_script is a string: (null) argument 1 incorrect type (string) expecting a Number (YYGI32)...
  11. G

    GMS 2 Using argument[0] Instead Of argument0 Causing Problems In Scripts

    For some reason when I use arguments with [] in this GML script, I get a an error message saying "Script: scr_check_proper_keywords at line 1 : no references to argument 0 but references arguments 1,2,3,4,5,6,7,8" However, when I use argument0 (the built-in constant) it works. Here is my...
  12. William Garrison

    GMS 2 Scripts as Variable Definitions?

    Simple question I would think, but is it possible to have a variable definition define a script? So that based on what room you are in (definable in the variable definition "isRoom") you can run that corresponding script? (definable in the variable definition "isScript"). if...
  13. Elgarion

    GMS 2 [Solved] Scripts in ds_list

    Good morning everybody ! I need some help to figure out how to enlist scripts. I tried this : //=========== in my first room create global.My_List = ds_list_create(); ds_list_add( global.My_List, Scr_Sript1, Scr_Sript2...
  14. Elgarion

    GMS 2 Scripts and strings

    Hello dear GM community ! I have a little issue with some code, hope some of you will help ! I would like to use strings/arrays to 'remember' the name of a few scripts. See below an example of what I would like to do : global.ScriptName_string[1] ="scr_this_is_a_script()" ...
  15. C

    GMS 2 Script to detect distance to object only working with one object.

    hi guys and girls, I am having some issues with a script I have made, Basically I want a space ship to drive up to a planet object and when its inside the diameter of the planet object get smaller (as if to land on the planet) I have got this working correctly if...
  16. P

    Need help with paths

    Hi everyone, I'm working on a day/night cycle and I have a path for my sun to follow, and keep in mind I have alot to learn, but I can't get it to work proper. Here's my simple code: Sun Script: path_start(pathSun, 20, path_action_restart, false); with(oParent) { //variables for shadows...
  17. EvanSki

    GMS 2 (Solved) Global wont update if in different script

    switch(Command) //do we have a command or error { case ("CMD_OVERFLOW") : show_debug_message("To many commands in one line") break; case ("CMD_ERROR") : show_debug_message("'"+input_string+"'"+"is not recognized as an internal or external command or operable program.") break; case...
  18. 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?
  19. X

    Asset - Extension ActiveVars - Trigger Scripts on Value-Changes

    ActiveVars Marketplace: https://marketplace.yoyogames.com/assets/8286/activevars Category: Extensions Price: Free Description: ActiveVars allows you to link scripts and variables, so that when the variable changes the script is called. Common uses may include: * Settings (resolution changes...
  20. KyleRansford

    GMS 2 Script Not Working with YYC but Works with VM

    Hello, when I finished a demo of a game in development my testing was done using the VM (Virtual Machine) export and everthing worked like it should. But, when I exported using the YYC (YoYo Compiler) the attached script doesn't work. It just hangs up. These are custom scripts by the way...
Top