• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

draw_sprite

  1. R

    SOLVED Drawing Icons

    Hello everyone, I need help to finalize a code that I'm writing to draw icons on the characters in my game, drawings that show which Debuff the character received (fire, poison, ice, etc.). I'll put my code for better explanation: var array_size = array_length(array_debuff); for(var i = 0; i...
  2. D

    SOLVED draw_sprite wants an object for some reason

    Hello. I have a for loop which loops through the width of a ds_grid and prints the names of items in the players inventory. I've been trying to also have it so that this for loop, depending on the item the player currently has "highlighted" in their inventory, will display a sprite of that item...
  3. stardust9000

    Is there a better way to draw an animated sprite from an object that has a different sprite assigned?

    Below is what I have come up with that works, but I was wondering if there was a simpler method? I feel like I am missing something obvious. // Create event. sprite_to_draw = spr_...; animation_speed = sprite_get_speed(sprite_to_draw); swap_frames_timer = animation_speed; current_frame = 0...
  4. D

    "Trying to draw non-existing sprite." on existing sprite

    I'm making a health indicator utilizing the draw_sprite function. However, when I try to execute the line of code, this error appears: ___________________________________________ ############################################################################################ ERROR in action number...
  5. David Lorenz

    SOLVED Draw Nine Slice Sprite on Scaled up GUI

    Hello, everyone! I'll go straight to the point: I want to draw a textbox sprite that uses nine slice on the GUI layer, but it appears tiny because my GUI is scaled up. Got any suggestion? Thank you!
  6. K

    GML Get image_index when drawing sprites manually

    This isn't really an issue, just wanted to share a solution I found in case anyone else runs into this. If you draw sprites manually (ex. draw_sprite_ext), image_index can get messed up because it can return a decimal, and it can also increase larger than the image_number, basically...
  7. R

    draw_sprite for animated sprites

    hello guys, I just need to take a doubt, something much more basic how do i create or draw in the animated sprite case? I was looking in the documentation but I didn't find anything to help me, and I also didn't want to create an "obj" to just draw something basic (example to better understand...
  8. K

    draw_sprite animation speed

    Hi, I have an enemy object that the player can focus on. When an enemy is focused I want to draw a marker on it (a rotating circle to indicate that the enemy is focused) I thought I could do that within the Draw event of the enemy object, however the animation speed of the circle is extremely...
  9. Tizzio

    Windows [Bug Report] Sprite "auto clipped" when it should be visible

    Hello, This issue it's not that easy to explain but i'll try to be as clear as possible. It's important to mention that this bug is present only in GMS2+ Let's start with this code and try to break it down in smaller parts: surface_set_target(surf); draw_clear(c_white)...
  10. G

    GameMaker drawing action is not working.. please help!

    Hi guys I'm new to this tool and I'm making a inventory function. Here's my idea: 1. Click an object on screen 2. Destroy clicked object and draw sprite of clicked object at fixed space. My problem is drawing is not working.. I add event left mouse button pressed like this ...
  11. Axl Trauts

    image_speed not working

    Hi, I am really confused here. I made my player object fire a missile that "goes to the sky", that is, disappears and when it does, it creates rain. Like a rain missile :P Anyways, the thing is that the rain sprite does not animates at all, it has 4 subimages. This is what I did on the Missile...
  12. SubWolf

    GameMaker [SOLVED] Tranparent Sprites in Surfaces

    Hello everyone, I'm in trouble dealing with sprites that have some transparent parts. When I draw them in a surface (the surface has a background colour) the transparent part shows what's behind the surface. I'm uploading an image of this problem here. The code is something like this: ->...
  13. K

    GameMaker draw_sprite(animation does not work)

    The function draw_sprite(sprite_index,subimage,x,y) with the value "-1" in the "subimage" should draw an animation from all the sprite frames "sprite_index", but it does not. But in another project everything works as it should.
  14. Octopus_Tophat

    GameMaker Sprites culling when manually manipulating matrices

    Hi, I'm not using cameras in my game for complicated reasons that I don't really feel like explaining. I basically have my own draw pipeline, where the main game control object handles all the drawing for my custom cameras. So my custom cameras are manipulating the matrices while setting...
  15. MartinK12

    Question - Code [SOLVED] Pause menu with background sprite from application_surface

    Hi guys, I'm playing with the tutorial for GMS2 and I added to the game obj_pausemenu with this code: 1. In the CREATE event: pause = 0; 2. In the DRAW event: var camx = camera_get_view_x(view_camera[0]); var camy = camera_get_view_y(view_camera[0]); var camw =...
  16. I

    using draw_sprite in function

    hi, i want to make a dash where the player "teleports" a few pixels away and i want to draw his sprite a few times along his way (like in hyper light drifter). anyway here is the code: (inside player step event) if keyboard_check_pressed(vk_space) and d_cd == 0 { var l = d_length...
  17. Gamerev147

    Legacy GM Drawing Sprite

    Either I'm having a massive brain fart from not getting any sleep or this is harder than I think. I have NO sprite on an object called "obj_Wall_1_Select" In the draw event of this object, I'm drawing a sprite called "spr_Wall_1_Select" at view_xview[0] + 6, view_yview[0] + 6 How can I make...
  18. W

    GML sprite_draw_general Problem

    Hello everyone I'm currently working on a lightning system i'ts working fairly well but i have one problem thats really messing the whole thing up: I draw my lights with draw_sprite_general because i want as much customizability as possible. This works great but with the problem with that is...
  19. Nathan Laing

    Legacy GM [SOLVED] Saving memory by drawing with negative scale

    Greetings everyone, I don't know how Gamemaker handles drawing behind the scenes, and would like to confirm if the following theory has any merit with a view to saving graphics memory; If I have a perfectly symmetrical image, I could cut that image in half, importing into Gamemaker only this...
  20. K

    GML Is draw_point slow?

    Hello. My situation is that: I have to access(read and write) 'each point' of image. The image is about 400x400 and grayscale, and for now I made an array(2D, 400x400) for the image. But this is very slow, I think the fps is about 4 or 5. And I do not know which one of 'array' and 'draw_point'...
Top