gml

  1. FoxyOfJungle

    Asset - Scripts TurboGML - Must-have script library (free open-source)

    TurboGML The largest collection of useful general GML functions (Math, AI, Linear Algebra - Vectors, Arrays, Structs, Strings, File Search, Paths, Conversions etc) WHY? I always had a problem of needing general purpose functions and always copying from previous projects. So I created this...
  2. Overlord90098

    SOLVED Creating a RE3 nemesis style enemy

    How would I treat this enemy I know how to get them to know where the player is but how do I allow them to teleport to other rooms?
  3. M

    SOLVED Any help with error GM1019?

    I am getting the error on calling the handle_colision_player function. GM1019: The function 'obj_player_Event_Step$$handle_colision_player' takes no more than 0 arguments but 4 are provided. obj_player : Step 37:2 /** * Function handle_colision_player(_setter, _distance, _obj...
  4. B

    SOLVED (GM8) Two near-identical pieces of code. One works, one doesn't. Why?

    I'm absolutely stumped right now. Here's the premise: I have an abstract parent object obj_door. I have 2 cosmetically different objects that replace themselves with the parent object upon room creation, passing whatever information they have to it. There's literally a one letter difference...
  5. B

    Legacy GM Figuring out isometric depth.

    Hello! I'm working on a sequel to my tile-based isometric puzzler and... ok I'll skip the tragic backstory. Here's the issue: I'm dynamically updating the depth of objects to reflect their real depth (effectively the Y position) and that works fine as long as everything is aligned with the grid...
  6. V

    GameMaker Alarm/Timer System

    Hello I use DND (excecute code also works) and I want to make it so a certain room has a timer, so when you enter that room it lasts a certain time. Specifically I wanted to make a title sequence, So the games title comes up for a few seconds and then it moves to the next room. (the title isnt...
  7. DrStupid87

    GML Script to scroll a map doesn't work properly

    Hi all. Posted this previously but I can't reply to it for some reason. Did some updates to it on the advice of TheouAegis. So, my project renders an isometric map. I have a function that lets you zoom in on it and that works fine. There's a separate function that's meant to pan the map and...
  8. Aquilla

    GML Coding intermittent idle animations when using four-point direction sprites

    Hey! So I've seen a few threads on here on related topics, but none of the methods proposed in those threads seem to be working for me, which either means (1) I am radically misunderstanding the code in question or (2) something else in my code is causing problems. I've tried banging my head...
  9. T

    GML Limiting vertical viewport movement in a platformer

    Hello! Reaching out to the community for some direction/assistance modifying my current viewport setup. I'm building a retro-style platformer game, and the code I'm currently using to manage the viewport is posted below. Note that this is inside of a "step" event. var xCam=...
  10. Jotesco

    SOLVED Vertical Border

    I'm trying to do when the player down, the camera down, when the player up the camera up,but it's not working, i set the Vertical Border to -1 and even the camera only goes down, when the player goes up nothing happen. Please help i'm not understanding how it working.
  11. Overlord90098

    SOLVED How to have swimming in platformer

    I was just wondering how to add a swimming state to a character I was thinking if (global.can_swim) && place_meeting(x,y,Owater) { state = swimming } if (state = swimming) { // allow up, down, left and right movement with jumping to leave } else { state = normal; } my main issue is whether I...
  12. JustAGameMaker

    String Templates/Concatenation for GMS1.4

    GM Version: GMS 1.4 Target Platform: Windows Download: n/a Links: n/a Summary: Since not everyone uses GMS2 and don't have the money to keep paying for subscriptions, I made my own string concatenation script for GMS1.4. What does all this mean? Well instead of going through the hassle of...
  13. Chillin

    SOLVED Inconsistent error: "array_get :: Index [1] out of range [1]"

    The way my game's inventory works is as an array. Every item in the inventory is just stored as a string. This is the Sword in inventory as taken from the save file: ["Sword"] I use Scripts to remove and add items to the player's inventory. This is the code for "scr_inventory_add()." It works...
  14. C

    GameMaker move_tovards_point stopping issue

    For some reason move_tovards_point works yes, but I just don't understand how to stop it. I tried to stop it by setting the speed to zero when it gets to the target, but that doesn't seem to work. I'm trying to do something similar to a homing attack but two problems: it flies up to several...
  15. tipsnipper

    GML Visual My walking code suddenly stopped working after I tried adding a new move.

    I'm creating a platformer game using GML Visual, and I just finished walking and jumping. I tried implementing a move that is supposed to send you upwards and to whatever direction you were facing midair, when suddenly I couldn't walk on ground anymore. It only works mid-air. Can someone please...
  16. V

    GameMaker acceleration

    So what im trying to do is when the player is shooting he gets sent back a bit and i managed to do that: if (mouse_check_button(mb_left)) && (cooldown < 1) && weapon_picked_up = true && can_shoot = true { x = x - lengthdir_x(8, weapons.image_angle); y = y - lengthdir_y(8...
  17. lddangon

    SOLVED Smooth disappearance of the layer

    Good afternoon. I want when the player enters the house triggered - the layer on which the roof tiles smoothly disappeared (became completely transparent). I know that you can turn off the visibility of the layer. There is also a very crooked thing - fx _filter_tintfilter. If you set the last...
  18. V

    make an object stay on top of another object

    so currently i have this code if keyboard_check(ord("E")) && distance_to_object(weapons) <= 50 { weapons.x = x; weapons.y = y; } and when i run it, make sure im I'm range and press "E", the weapon stays on top of the object while i hold "E" but that's not what I'm trying to do...
  19. TheOnlyWRT

    SOLVED Melee Attack Function Not Working

    Hello, So I am using a function to log an object that has been hit by a melee attack. The idea behind it is a method I have seen several people use and I feel like I understand what is happening. However, I cannot get it to work. Here is the function: function CalcAttack(_maskIndex) {...
  20. Overlord90098

    SOLVED Player respawn points

    I was wondering how to go about player respawn points for a metroidvania style game. Should the respawn code be within the player or checkpoint_active objects? I was thinking of saving the most recent checkpoint's x & y coods as two variables than placing the player there on death. After...
Top