1. sivispacem

    SOLVED Draw Instance Score - prints double (overlapping) text

    ---If you duplicated your room, ensure you do not have more than one persistent object placed in more than one room.--- Thank you to @TheouAegis, @Slow Fingers for the assistance. As the title suggests, I have been following the "Space Rocks" tutorial and all parts of the game work as the...
  2. J

    Instance creation not working

    Hi there, long time user and lurker of GM. I'm currently having a problem with instance creation, none of the instance functions seem to draw to screen despite being in the draw method. Here is my simple test code, which does not draw: create_instance_depth(room_width, room_height, 10000...
  3. G

    Sleep Margin on Linux?

    Currently trying to make a headless dedicated server with GMS2 running on an AWS linux machine. I need it to perform GameMaker's collision functions to make the server more authorative (replicating these functions are incredibly difficult in other languages/engines). I'm very close, I've...
  4. flyinian

    SOLVED How would I get a instance to pass its draw code to a parent and then have that parent send said draw code to all its children?

    I have 1 parent w/ multiple children. I then have one object(obj_DrawCode) that is passing its draw code to the parent. My problem that I am having is that only one child is receiving the draw code. I checked the debugger and it says only one sprite is being drawn. I am trying to draw a...
  5. flyinian

    SOLVED What would cause a sprite to animate at room speed(or really fast) when its coded to draw in the draw event?

    Newest: So, I just tested the code in another object's draw code and still had it animating really fast. I then added the "image_speed" in the create event and set it to 0.1 . This slowed it down and it appears to animate at desired speed. Could someone explain this to me? As well as, how to...
  6. X

    GMS 2.3+ Drawing a circle gradually

    How can I draw a circle outline so that it looks like the circle is being drawn rather than just appearing drawn I currently have this draw_circle(x, y, 28, true); which draws it in one go but I want to show it being drawn pixel by pixel so it looks like it was drawn by hand
  7. jobjorgos

    SOLVED how to draw_sprite from sprite index number?

    function scrItemHover(argument0) { icon = argument0; //this is the sprite name, something like spr_wooden_sword or spr_iron_dagger draw_sprite(icon,0,mouse_x,mouse_y); } ERROR: draw_sprite argument 0 incorrect type (string) expecting a Number (YYGI32) In GM1.4 this worked fine to...
  8. The_Scientist___

    draw_rectangle() Problems with Transparency

    I'm trying to make a textbox that appears when the mouse hovers over the object, and I'm drawing a rectangle as a backdrop for it. However, if the object is far enough to the right, I want to make it draw in the opposite direction, but when I do, it turns semi-transparent and draws behind other...
  9. K

    Drawing Sprites while game is paused

    Ok, basically. To pause the game i'm making I use the code: if(keyboard_check_pressed(ord("P"))){instance_create(0,0,Pause)} And then, in the create action on Pause instance_deactivate_all(true) But when I do this, every instance Just stops being drawn. How can I pause the game, and still...
  10. Strakee

    Drawing on specific layer only

    Right now I have a blood drawing mechanic that draws on a simple area surface. It works like this: An object is created and as it flies it draws itself repeatedly on the surface like a brush. The goal is to make it not draw itself on the background. (The blue part in the image is a background...
  11. N

    SOLVED Sprite draw order depending on y variable?

    Hello I'm doing a top down rpg and while the characters' collisions are 16x16, the sprites are 16x24 Basically this means that characters or objects should appear layered in front of the ones above and behind the ones below at all times, but I don't know how to do that because objects seem to be...
  12. W

    Can I draw_sprite from a script?

    Can I draw a sprite from within a script? I can't seem to get it to work. I know the script is running because I can get the messagebox to pop up. e.g ///@description Makes sprite hover on cursor for placement ///@arg sprite var sprite = argument0; var xx = mouse_x; var yy = mouse_y...
  13. I

    Solved - Drawing Rectangle over time in GUI

    Hi, I have some semi-working code in my project that runs a script when the player clicks on certain tiles in-game. I'm struggling with slowing things down to get a smooth look! What I want to happen is: The player clicks the tile. A small blue bar appears in the tile below and fills from...
  14. Claspo Jones

    GMS 2.3+ 2.3 Sprites Not Drawing

    Whenever I run my game none of the sprites or text draws, at first I thought the camera wasn't in the current room, so I used camera_get_view() and show_debug_message() to check, and it told me the camera was in the middle of the room. I tried adding draw_self() to my player object, but still no...
  15. ohdudehelpme

    GMS 2 How to make a shrinking red zone (Battle royale type)

    Hello, I'm a little new on this forum I have recently moved from GM8 to GMS2 I want to know if there's a way to make a shrinking red zone and its safe zone which can hurt the player if its outside the safe zone, can please someone help me?
  16. Dagoba

    Make draw_sprite follow its parent sprite

    Hello, I have a player object with draw_self(); event and an event to draw a hat upon its head. While the player is still, the hat is in the correct position but whenever I walk or run, the hat will go offset by 1 or 2 pixels depending on if I'm walking or running. The Draw event for hat...
  17. M

    Drawn shadows overlapping issue

    So in my top-down viewed game, I have cloud shadows (transparent sprites) that occasionally fly over the levels. They overlap tho, causing the overlapping section to go dark, and it looks bad. I tried learning to use Surfaces to overcome this issue..... but honestly i dont have much clue how to...
  18. A

    GML Can I use the same font with 2 different sizes in the draw gui?

    I searched on google and found no way to change the font size Help me pls, i'm noob xd
  19. rob2d

    Windows Background layer shows above sprites

    Hi, Recently started to get familiar with Game Maker after a long hiatus from any kind of hobby game development and found that in GMStudio 2 (Beta v23.1.1.67), I am having issues where the background always draws above sprites. If I check the room settings, the depth of the background layer...
  20. helpless_coder

    GMS 2 How can I determine distances in fake 3d?

    [CLOSED] Got help from the Math discord, and they came up with this solution: if (relative != noone) { var start_point = argument1; var end_point = argument2; var input = argument3 if (input > 100) input = 100; else if (input < -100) input = -100; var distance =...