draw event

  1. Wigglebot

    SOLVED Problems with draw_getpixel [GMS 2.3+]

    I am utilizing a grid-based battle system and I want the attacks to flip the tiles they affect in the range that differs between attacks. I want to be able to easily create these attack ranges via sprites as shown with the black and white example. It currently draws the sprite to the top left of...
  2. Ben Allen

    SOLVED make_color_rgb() Drawing Incorrect Colors

    My problem is fairly simple. I'm trying to draw text with a very specific color using make_color_rgb(), and it just isn't outputting the right color. Here's my code: //this is in the create event of a controller object in the room global.c_white = make_color_rgb(222,238,214); //this is in the...
  3. J

    GMS 2.3+ Sprites not Drawing

    My project was working perfectly fine. I had a space ship shooting bullets at enemies. Had done several quick playtests to check things I was editing. Immediately after a playtest, I decided to edit my bullet and flash sprites (they are separate sprites assigned to separate objects). As usual, I...
  4. A

    SOLVED Array out of bounds error

    got the error while executing my code for my card game code error: ___________________________________________ ############################################################################################ FATAL ERROR in action number 1 of Step Event0 for object obj_deck: Push :: Execution...
  5. E

    SOLVED Draw End Event 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...
  6. Krenzathal77

    Using "With" to address the draw event of an enemy instinctive from player

    Hi all, Is it possible to change the draw event of an instance using the "with" function? I'm trying to use it to change an enemy's rotation and x-scale from the player object frame by frame during a combat move. All my objects use the draw event so "image_angle" won't work, and the rotation...
  7. 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...
  8. 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...
  9. 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) {...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. T

    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...
  15. E

    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...
  16. 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...
  17. P

    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...
  18. 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...
  19. 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...
  20. 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...
Top