draw_sprite

  1. 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...
  2. 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...
  3. 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...
  4. 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)...
  5. G

    GMS 2 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 ...
  6. 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...
  7. SubWolf

    GMS 2 [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: ->...
  8. K

    GMS 2 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.
  9. Octopus_Tophat

    GMS 2 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...
  10. 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 =...
  11. 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...
  12. 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...
  13. WinuX

    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...
  14. 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...
  15. 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'...
  16. M

    Flashlight not staying on player

    Hello! I have a simple surface darkening everything and I have a flashlight sprite going form the player with bm_add. Thing is, everything looks perfect but the flashlight is drawn on a different position rather than the player's position and it moves at different speeds as well. I am using...
  17. Freedom2Fight

    Legacy GM Request help. Making images cycle.

    I've been trying to achieve this: I can move the images left and right but I'm having trouble making the images to cycle as shown above. Pressing right key increases the variable [item] and pressing left key decreases [item]. For drawing the images: for (i = 0; i < 3; i += 1) {...
  18. M

    Colorizing Sprite Layers & Importing Layered Sprites

    Does anyone know if there is an easy way to colorize or even address individual sprite layers? Also, is there any way to import assets from programs such as Piskel with the layers intact? I'm asking, because I'm trying to have character customization as a feature in my game. In GMS2 we finally...
  19. A

    GML Draw_sprite question

    draw_sprite(sprite, subimg, x, y); is there a way to draw the whole sprite (animation) instead of just a single subimage?
  20. M

    Showing sprite

    Hello everyone! Few days ago I have an idea to make an clicker game with case opening. Everything goes without any problems till now, where I cannot show sprites in room. I make most of my code in room's creation code, but when I try to make some sprites using "draw_sprite" they simply didn't...
Top