draw gui

  1. FiftyFive

    GMS 2.3+ Making the screen black when player died

    Hello i m working on something. When the character falls off the map, the screen will turn black and the game will restart. (i am begginer so can u guys explain me slowly. Thanks) DRAW GUI event: draw_set_color(c_black); draw_set_alpha(image_alpha); if(obj_oyuncu.y > room_height){ image_alpha...
  2. C

    Pixel Perfect and "Pixel Snapped" GUI

    Hi guys, I need to make my GUI layer "pixel-perfect", and found no clue around here.. The blue cube is being drawn in the "Draw GUI" event The white cube is being drawn in the "Draw" event //I want the blue cube to behavior like the white one while rotating. //But found nothing like this for...
  3. A

    SOLVED Glitch in the Metrix?

    Hello, I am working on my game. And I have just found glitch in the Metrix. This is code in my "Destroy object", it is collision event with object I want to destroy after collision (and add 1 to global.missed, but unsuccessfully). with (other) { instance_destroy(); global.missed += 1...
  4. S

    GML Huge FPS drops when searching ds_lists?

    I have the code below in the Draw GUI event, where Target is an instance id, and has a instance variable of Inventory which is a ds_list. When this is executed I get HUGE fps drops, and I'm fairly certain it's because iterating through the whole ds_list every draw step is very memory consuming...
  5. M

    weird alpha during pause?

    Hey, so I implemented pause in my game with following codes: obj_pause: Create paused = false; scrn = -1; Alarm 0 scrn = sprite_create_from_surface(application_surface,0,0,surface_get_width(application_surface),surface_get_height(application_surface),0,1,0,0); instance_deactivate_all(true)...
  6. Michael Stearns

    GMS 2 Drawing to surface on many objects without reset_surface_target()

    Hey everybody~ I'm trying to do a bit of a strange thing where, explaining briefly, I want to draw a bunch of low res objects on top of a big high res object. It's a single screen game. To accomplish this cleanly, I thought I'd draw all the objects to a surface at low resolution, then in GUI...
  7. Papa Doge

    GMS 2 [Solved] Issue with GUI, on hover menus

    For context... I'm working on a quick menu system in an RTS game where the player has finite control over the current task of some worker drones they have purchased. The way it works is there's a portrait of the drone on the left side of the screen that shows their current task, then if the...
  8. SubWolf

    GMS 2 [SOLVED] Sprites' speed in the same Draw GUI

    Hello everyone, I'm having this problem with GMS2... I have one object that is called to draw a kind of window with buttons and some images (sprites). I draw these different sprites in the "Draw GUI" of the object, something like: draw_sprite(spr_ball_1, -1, x, y); draw_sprite(spr_ball_2, -1...
  9. K

    GMS 2 How do I draw a sprite dependent on a variable?

    I have a variable "energy" and a two sprites, "sprEnergyHalf" and "sprEnergyFull". How do I draw a sort of bar with these sprites? i.e. If "energy" is at 2, draw one sprEnergyFull. If "energy" is at 3, draw one sprEnergyFull and one sprEnergyHalf. If "energy is at 1, draw one sprEnergyHalf. You...
  10. R

    Floodfill code for my paint program

    If there's a thread with the same problem, maybe one with a solution, please link me to it. I'm making a paint-style program and I have the drawing tool and the erase tool. All I need is a floodfill tool similar to the one in this video. I tried importing the code from this page, however it is...
  11. W

    GMS 2 Inventory Items are not displaying in Draw GUI!

    Hey guys, I have been following this tutorial to set up my inventory system. However, instead of drawing through the draw event as he does, I am now trying to move all of that to the draw GUI event. Problem is, I can't get my items to display in my inventory when I pick them up. Everything else...
  12. A

    Legacy GM [SOLVED] point_in_rectangle not registering correctly with some GUI buttons

    Hola! Before you roll your eyes, I know there are a bunch of similar posts already but I've given them an eyeball and the suggestions in those (eg. device_mouse_x_to_gui, view_x) seem to have no impact whatsoever. I thought maybe drawing clickable buttons to the GUI when using a view had an...
  13. V

    GML Can't draw sprite in Draw GUI Event

    Hello, I'm trying to draw a panel with health(hearts) but nothing shows up. Here's my Draw Gui Event(for panel object): for (i = 0; i < player.life; i++) { coord = global.hearts_coords; draw_sprite(heart, -1, x + coord[0], y + coord[1]); } Every variable was checked with debugging and...
  14. bsabiston

    GMS 2 GMS1.4 -> GMS2 broken button behavior

    I imported my GMS 1.4 game to GMS 2 and boy it has not been smooth. One new issue I hit today: I have a button, a persistent object at depth 0. When the player presses it, I change the depth to -100 to bring it above some other stuff. Later, when they press it again, I put the depth back to...
  15. O

    GML Text not drawn

    greetings, I'm working on a top down RPG and would like to implement some text boxes. this is what I have so far: (Draw GUI event for obj_conversation) //textbox draw_set_color(fill); draw_set_alpha(0.95); draw_rectangle(camera_get_view_width(0)/32, 6.3/9*camera_get_view_height(0)...
  16. E

    Draw object on GUI layer

    I know the GUI layer is drawn on top of everything else and is not affected by the camera. I'm able to draw an object on the GUI layer using draw_self. However, the object does not appear where I expect it to. Is there a way I can change the coordinates of an object on the GUI layer? If so...
  17. S

    Legacy GM Pixel Perfect by RangerX transparency issue

    Hello, I had interpolation issues upon fullscreen toggling and used the Pixel Perfect method posted by RangerX to fix this. It works well and looks great, however some aspects of the game are drawing strangely: The left is without Pixel Perfect. The right is with Pixel Perfect. The issue in...
  18. S

    GMS 2 GUI Scaling Working Differently on Separate Computers

    This set of code: guiAspectScaling = 0.1; display_set_gui_size(display_get_width(), display_get_height()); display_set_gui_maximise(guiAspectScaling, guiAspectScaling, 0, 0); works fine on my computer. Everything seems to scaled correctly. And even when I create an executable of my game, and...
  19. Sarena

    GMS 2 [SOLVED] Health Bar not showing correct HP

    I set up a health bar to go along with my player's hp (which is 4), but for some reason the health bar image itself is acting as if my player only has 3 hp. I attached an image to showcase the issue. Here is my objGUI's Create Event: // Set Global Variable global.playerhp = 4; And the Draw...
  20. Vintendi

    GMS 2 (SOLVED) Draw GUI is off centre [Beginner]

    I've recently had an issue with my project I've been creating in game maker studio 2. Recently when trying to do stuff in the draw event it appears off centre. This does not occur with draw_sprite or draw_text it occurs with draw_grid and draw_circle. It only happens on this project. In Draw...
Top