draw event

  1. E

    Question - Code Draw Events Not Happening

    Hi, I have a long standing project I recently moved from GMS 1.4 to GMS 2, and although the transition has been very clean, (props to the GMS 2 dev team on that one,) I came across what I’m thinking is a bug in GMS 2. My game is a top down game, where I am shifting the depth of the instances in...
  2. R

    Sprite Sheet Animation Ideling to animate blinking eyes

    Hi guys first thanks for any advice im pretty new here! :) I just draw a personal sprite sheet of a character with the dimensions w: 1664 height: 512 pixels so thats basicly 128 px grided character with 13 frames for each direction AND the first 3 frames are ideling and blinking eyes!!! i want...
  3. M

    Drawing something inside draw event of other object

    Hi All Just a short question, i couldn't find an answer by googling... Is it possible to execute some code in the draw event of another object? Example: // Step event of obj_gamecontroller: //------------------------------------------------- if (button_debug) { with(obj_object_B) {...
  4. P

    Drawing Circle Part of Sprite

    So hello everybody.My problem is tahat i want to draw circles(players in my football game) with many different sprite colors but my problem is that i also have some pointers around them wich are animated but i have it as one sprite with 2 layers( Circles itself and Pointer around it). So how to...
  5. William Garrison

    GMS 2 Drawing Tons in the Background?

    Okay so something peculiar is occurring. I have eliminated script by script but its still happening. So it looks as if the sprite animation is drawing over and over and over and over in the background behind the background in addition to the main object itselfs sprite? Thats all i can guess...
  6. A

    GMS 2 Creating Console like CMD in GameMaker

    Hello guys. I'm trying to do a console like CMD (on windows) for my game. I did something but I have a very big problem. I need to create a draw_text code when I hit a button. Its like when you wrote something meaningless on cmd and then enter it says something like "unknown command" and it...
  7. FoufaDjo

    Shaders i cant get the shader to work ;c

    i fond a very good shader from a web site but when i put in my object the object become invisible xd can some one show me were is the problem or if u have better glow shader for sprites let me know ^^ : varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform float sigma; // The sigma...
  8. Two_kings_Games

    Objects Id connected to draw sprite

    Hello everyone. Have a cool person who used pseudo code to help me understand. I'm pretty sure im getting it but something isnt working right and Im not sure. Been reading in on for loops, with statements and ds_list for days. Been on this issue a little long and think it's time to ask for...
  9. Ellys

    GML "Draw Sprite" on click

    Hey coders, I want to draw a sprite on click and have it stay there until I click again. This is what i have so far. if mouse_check_button_released(mb_left) && position_meeting(mouse_x, mouse_y, oStats) { draw_sprite(sStatBG, 0, 400, 400); } I understand the draw function is usually in the...
  10. J

    GMS 2 Drawing to Surfaces once outside Draw Event

    The official yoyogames documentation for draw_clear_alpha says that it is "only for use in the draw event of an instance (it will not show if used in any other event)". However drawing to a surface one time and then saving it to a sprite required me to do it outside a draw event, which worked...
  11. Paris Stalker

    GML SOLVED: Drawing A Surface Onto Another Surface From Another Object

    Hi all, I know it's possible to create a surface in an object and then use the with() function to draw multiple other objects onto that surface whilst it's targeted, and have managed to use this successfully. However, in an attempt to optimise my draw pipeline I was hoping I could do the...
  12. Suzaku

    GMS 2 How to place objects with draw event

    Im starting to use the draw event to draw everything, as I ve been told thats a more professional way to draw stuff, but Im having problems, more specially when I have to figure out quickly the coordenates to put my fixed objects(like walls, ground, static things).on my backgrounds. Is the draw...
  13. Suzaku

    GMS 2 How to detect moments in a animation sprite?

    Lets suppose that I have a object that represents a lady character: and I have this animated sprite: I want this character object to move a little to the right until it reach the frame 4 on that animation. Then the object must stop moving because the character will start to get up...
  14. B

    GML Problem with drawing layers in the "Draw End" event

    Hi ! The problem i have is that drawing the application surface or any surface for that matter in the Draw End event results in just a black screen. Everything that is drawn in the Draw GUI event still shows up though. Drawing regular sprites in Draw End works fine too. I just use this...
  15. B

    GMS 2 [SOLVED]How do i draw sprite tiles through gml

    The code bellow is what i am using if(xi >= 640) { xi = 0; yi += 64; } if(yi >= 640) { yi = 0; xi = 0; } draw_sprite(curr_draw_bg,0,xi,yi); xi = xi + 64; it draws sprite in each new position and then it dissapears and...
  16. Kasra

    Legacy GM sprite looks weird [SOLVED]

    there is some weird coloured polygons in my sprite when i zoom, iam not using vector sprite, so how can i remove them, i want gm show the sharp colour like adobe photoshop. Target Platform (Android).
  17. AtomicToilet

    Legacy GM Interacting with objects sort-of works, except...

    Holargh! I've written some code that works pretty well (I'm prototyping a 2D side scroller investigation thingy) except it displays the first line of text every time the player passes by the object in question. OR, it disappears after a few button clicks. Like thus: and this (though this is...
  18. KyleRansford

    GMS 2 How to Draw a "point_in_rectangle();" Check [SOLVED]

    This question might seem a little too obvious but, I'm using a point_in_rectangle(); to check for collision when the player walks up to an NPC to start a dialog with. The problem is, the player can only activate the dialog when they are above the NPC. This is on a 4-way movement style game by...
  19. Ephemeral

    GML Drawing from within a Script

    In my draw event, I have draw_custom(x, y, etc.); draw_circle(x, y, r, false); the draw_custom script has draw_circle(etc.) The non-script circle shows up. The script circle doesn't. What gives? Can we not draw with scripts anymore?
  20. Spongyoshi

    [GM8.1] Translating a score into sprites

    Okay so I tried my hands on the "draw" event because I wanted a score to show up but wasn't a fan of just having it in black arial so I wanted to have custom sprites to display the score instead! However, what I through was a normal task is more complicated than I thought! I hardly can find...
Top