draw event

  1. giraffeman210

    GML Visual Draw Event That Only Draws Once?

    I am using GMS2 with dnd and was wondering if there was a way to make a draw event only draw what's asked of it one frame and then hold the drawing until it is destroyed? Pretty much I don't want it updating the drawing every frame. Is this possible? Thanks! :)
  2. C

    is it possible to draw variables on objects with codes?

    hi, im working on a game that involves drawing hundreds of variables on objects. each object has its own unique variable ( a counter) attached to it. currently im using drag n drop and have done 50 this way. the position for the count is -5, -5. obviously this is a very long procss and will...
  3. A

    GameMaker Drawing A Pentacle

    I have looked in the manual and found no code that helps me with this issue, and there is nothing on the forum that can help me. I was never really good at math and that will probably be my solution. I will do my best not to break any rules with this post, however it is my first one, so bare...
  4. E

    GameMaker Need Help With "draw_set_halign()" Function

    I'm creating a simple inventory screen for my game in its own room. The room currently only has two objects that possess draw events (to clarify, there are other objects in the room, these two are the only ones that use the draw event). The first object, called "obj_inva1amountcounter" counts...
  5. Furkan Karabudak

    GameMaker When I change the window size, I see "surface isn't found" error, or surface resets

    I'm working on a drawing program. If I create a surface in create event then I get an error about "surface not found" when I resize the window. If I create the surface in draw event, when I resize the window the surface is automatically aligned to that size and I am not getting an error, but the...
  6. C

    Execute Code while drawing part of a background

    I was wondering if it was possible in Gamemaker Studio 2 to have a script or some other code execute when a specific part of the screen is being drawn. This was used in some older video game consoles to make some cool effects. Example: at 14:20
  7. S

    Drawing with Web Export

    I am trying to use the draw_rectangle method on the "Draw" event of an object. I can see it draw with the Test platform, but when exporting to web, the stuff drawn with draw_rectangle does not appear in the browser. I do not see this as a limitation spelled out in the HTML5 issues page so I...
  8. C

    Legacy GM [SOLVED] I may be dumb, but I am having trouble with fonts

    Ok so i am making a text box and it works fine without setting my font (which i called fnt_text) but when i set it (this is all mostly in the draw event) the text doesn't show up at all. maybe i made a mistake so here is my code: create event //settext variable text = "i gotta make this string...
  9. G

    GameMaker draw menu every step v. draw menu to surface

    i was wondering if anyone had advice on when it's appropriate to use surfaces. i've read that you should use it when drawing things that don't change often, but there's a certain vagueness to that. i have a few menus that make heavy use of text, like dialogue, inventory, etc. and thus drawing...
  10. Z

    GML Use All Instances Of An Object In Draw Event [SOLVED]

    Hi folks ! For my shadow system in my top-down game (faked 3D), I created two types of shadows. A "static" shadow drawn under huge objects and platforms and a "moving" shadow drawn under my oPlayer, NPCs, enemies, etc.. My "static" shadow (called oShadow) is a simple black object with an alpha...
  11. D

    Legacy GM [SOLVED] Draw event fatal error caused by unrelated object

    I have a test enemy that I am trying to draw a health bar for, fit to the size of the object. I've tried this using fairly simple code (in the draw event). draw_self(); draw_sprite_part_ext(sprHealthBarEnemy, 0, 0, 0, sprHealthBarEnemy.sprite_width * curHealth/maxHealth...
  12. Vinsane

    Having issues with drawing Ammo Counter (Depth Issue)

    Hi guys! I have an issue going on with drawing some font on top of my background object. The background object has depth set to - depth = -1 I then have an object that draws the score within the room. within the create event the object that draws the score has depth = -100 Under the draw...
  13. P

    GameMaker Antialiasing for circles in draw events

    The game I'm currently working on has smooth, vector like graphics. I'm trying to get antialiasing around curves drawn using draw_circle or draw_roundrect. Enabling pixel interpolation in the Windows platform options doesn't seem to work. Using sprites is not a solution since I'm animating the...
  14. Z

    Drawing Sprites animated

    Dear GameMaker Community, I have been working a dialogue system for quite sometime now and everything is going exactly as expected. However, there is an issue that I have dealing with that cannot figure out I intend to draw a profile picture that animate lip movement so in the draw event I set...
  15. R

    Legacy GM How to increace draw_line() performance?

    Hi, I'm making an interactive grided background: it runs smoothly for about 10 seconds, then fps start to drop, the debug overlay shows the draw event is taking quite long time, in the draw event, draw_line() is called about 2100 times per frame, I wonder how can I increase the performance...
  16. A

    GameMaker Advice on when to execute a sprite managing script

    Here's a question that I think ultimately boils down to event execution order and event optimization: I have a sprite manager script that does simple but useful things for me, like letting me automatically stop a sprite after playing it, choosing choosing a new last frame, and potentially...
  17. G

    GameMaker [RESOLVED] Low FPS - Large Clear Screen Draw Event?

    Hello, This is my first time posting so I apologize if I get anything wrong. I am working on my game called Veins of Light developed in Gamemaker Studio 2 and I am having issues on my laptop regarding low FPS. My set room speed is 60 (fps), but my game runs at only 30fps on my laptop, a Macbook...
  18. L

    Collision mask, from combination of sprites.

    I was wondering if there is a way to merge collision masks of multiple sprites. That's because objects in my game that I'm making, do not have a specific sprite assigned, what I do is I use draw event, to draw my object programmatically using a combination of different sprites. e.g...
  19. Fixer90

    Legacy GM Drawing a sprite on another sprite?

    This is a bit of a tricky one. I'm trying to make a mirror that reflects playable characters. Here are the [basic] sprites (scaled up 5x): They are both 18x24 sprites; "spr_mirror" is the left one, and "spr_mirror_2" is the right one. This is how they work in obj_mirror's draw event...
  20. S

    Question - IDE (FIXED)Draw event does not work

    hello I recently cleaned my computer with ccleaner and moved a bunch of files and folders around. however it seems gamamaker's draw event no longer runs. this is not a code issue because I did this to confirm.. -create test room and object -create draw event in test object with...
Top