1. L

    Player moves instantly instead of going slowly

    I am struggling with a thing. I can't make this object go slowly to an object that is supposed to attract it with another object, so when it touches "TheZone", it should go up slowly until it reaches "traget", but it just teleports there. does anyone know what should i do? if place_meeting(x...
  2. L

    number of arguments for function approach expected 0 got 3

    does anyone know why i get the error from the title? vspd = approach(hspd, vInput, accel); the script: if (argument0 < argument1) { argument0 += argument2; if (argument0 > argument1) return argument1; } else { argument0 -= argument2; if (argument0 < argument2)...
  3. RyanC

    GML 2 Color Lighting System - Surfaces & bm_max Issue

    Hi All, I'm wondering if anyone can suggest a better way of doing this: My lighting system uses 2 separate surfaces, 1 for all the background sprites and 1 for the foreground with the player and floor blocks etc. I am trying to achieve a system that will render these surfaces in the GUI_Begin...
  4. SirCaliber

    GML Any way to find Socket IDs while using UDP?

    So the server object and the client object both exist at the same time. But the client object on the host's (server) game seems to intercept certain packets. Basically I have it set up like this: Client sends a little packet to the server Server gets that packet and returns a handshake packet...
  5. McJazzhands

    SOLVED Creating a group of active enemies that function as one unit

    Heya folks! I'm back with a question relating to Gradius once again. This time around, I'm trying to recreate the bean enemies you see when you start the game, shown below: What I'm aiming for is a group of identical enemies (A) that drop a powerup capsule for the player when the whole group...
  6. T

    GMS 2.3+ Help with sprite atualization

    Is there a way to create an object, but with sprite number not starting in "0" ? For example, I need to make a character change when a key is pressed, but, when the key is pressed, if the direction of the character is right, I need to use the first image of my sprite [0], if the character is...
  7. H

    SOLVED Walking doesn't work with finite state machine implemented.

    I have an issue that the character is unable to displace when the respective keys are interacted with. I've implemented a finite state machine to manage the different states and transitions between states. Here is the code: Step: get_input(); switch(player_state) { case 0: player_idle()...
  8. A

    GML Counting keys in .INI section

    Hiya there! First time poster: Dyslexic, Used to DnD but need to add some code here and there. I am making a simple theme generator that reads a .ini file. I am currently setting up the system that counts how many themes are in the system so the random number function understands how many...
  9. M

    GML Having problems with jumpthru platforms when colliding with 2 of them

    So, basically, the following interaction is happening in my platformer metroidvania like game: The green tiles have invisible square objects placed over used to only handle collision (oGround), and I'm having a lot of trouble to set these objects as jumpthru and not have a problem when I get...
  10. P

    GML Apply surface only on part of screen

    Recently I came upon this CRT filter and wanted to use it in my project. Essentially how it works is through one object, which draws the filter in the Draw GUI event. Here four passes are done to run each component of the filter (downscaling, scanline filter, screen distorting and...
  11. SgtMoose151996

    GMS 2.3+ 1-button GIF Recording

    I have implemented an object for recording and saving GIFs during gameplay (with the help of Shaun Spalding's tutorial). The code in the Post Draw event is shown below. /// @description Record GIF key_record = keyboard_check_pressed(vk_tab) || gamepad_button_check_pressed(0,gp_select) ||...
  12. Antikore

    GML Can GM:S or GMS2 execute a python code/program?

    Sorry if this may not be the correct sub-forum to post this. (I don't have access to Advanced sub-forum and I didn't want to ask for permission for just a random question.) It doesn't need to be on the actual IDE, the only thing I could need its somehow the python code and my game be able to...
  13. FoxyOfJungle

    SOLVED Passing global variables to variable definitions?

    Hi, Is there no way to pass global variables using "Variable definitions" of an object? I defined particle_system_index and particle_index: I put the variable here but it doesn't seem to recognize it... I've tried switching to all types there in the selection but it doesn't work. When...
  14. Gamer0097Br

    SOLVED Moving camera with the mouse

    I'm creating a game where I can move the camera with the mouse. Initially I wanted it to be dragging, but then I saw that it's very complicated, so I decided that I just had to follow the mouse, that there is a limit, being the size of the room, so that it doesn't go to infinity, and also so...
  15. KironDevCoder

    SOLVED How to call GML functions from within C/C++?

    I managed to create an extension, next step to creating an modding extension is calling specific GML functions from within the extension. But how do I do this? My guess would be that I'd have to pass ptr(show_message) as an argument from GML -> C/C++, but how do I execute the function in C/C++...
  16. bodilliam

    GML Grid Code

    Hi guys I am somewhat new to GM, and was wondering if there was a easy way to make a snap to grid. There is on Construct 3 and I was just interested in knowing. Thanks!
  17. frootloop69

    GML [SOLVED] Per-pixel Destructible Bases using surfaces - only part of the image gets destroyed

    Hi all, hoping someone can help me out here. I'm making a space invaders type game and I want to add per-pixel destructible bases - something similar to the original Space Invaders game. Its mostly working, but I run into a strange problem. The bases seem to get destroyed fine up until the last...
  18. S

    Nine-slice collision doesn't work.

    I tried to make a box object that has nineslice with precise collision, the object shows up fine but the collision doesn't, does anyone have any idea? B.T.W I am using image_xscale and image_yscale to scale the object.
  19. Mr. SadGhost

    GML want to get Instance's coordination

    Hey peepz i'm back again! I have a map that is draggable with the mouse. Now i have some icons that are on the map itself, and i want to keep those icons "attached" to the map when dragged. I came up with this code which will put the object on the map, but takes a lot of time to get it in the...
  20. S

    i need help destroying other(without using event collision)

    if(place_meeting(x,y,obj_enemy1)){ instance_destroy(other) } The code above is the one that isn't working. I'm sure you have the idea of what I was trying to do. I'm guessing its because its giving true or false output, but I'm not sure how to make any alternatives without using event...