1. J

    SOLVED How to store Sprite in variable? best way??

    Hello everyone, I'm new to GameMaker (not programming) and I would appreciate advice for how and where to save sprites definition for use. Right now I have them in an global variable like this: #macro DIRECTION_UP 0 #macro DIRECTION_DOWN 1 #macro DIRECTION_LEFT 2...
  2. yukaccino

    SOLVED sprite_nineslice struct not hiding corners of a sprite

    Hello! I've been using the nine slice in my code to make it easier to adapt some portraits in menus without losing quality, which were doing really good. I apply the hide tilemode and everything is fine in most cases. However, in some situations where the top/bottom guide meets the left/right...
  3. AsAboveSoBelow

    SOLVED GMS 2.3 Change sprite with press of Space

    So I want my sprite to basically "transform" into a different one after pressing space bar, I have set up my sprite index and defined the sprites. I am super new to this and not the brightest to GML or a lot of coding. Thanks in advance! -ABSB /////////////////////////Player Movement and...
  4. T

    Fading between frames in a sprite

    Can I fade from one frame to another in a sprite? Like in a slide show? Thanks and BR, Thorsten.
  5. P

    GMS 2.3+ How would you blur only a specific selection of a sprite and not use any outside pixels?

    Sorry if this is in the wrong forum to put this, but I don't really know where else to put it. Is there a way that a blurred selection will only use pixels from within the selection? It's hard to explain but here: I would like to be able to blur what's inside of the rectangular selection and...
  6. Ricardo

    GMS 2.3+ Sprites asynchronous loading

    I’d like to start a discussion about asynchronous loading - especially when it comes to sprites. A lot has changed since the first iterations of GameMaker when all the project resources were loaded and thrown at RAM (and VRAM), but there are still a few key issues that are a limiting factor...
  7. R

    Windows Put center of sprite in the mouse pointer

    I need to Put center of sprite in the mouse pointer. When shooting bullets, the shots leave the center of the crosshairs depending on the resolution. // kind: instance_create(mouse_x + 8, mouse_y + 8, Ox); // Problem occurs depending on resolution // = need to put the sprite of aim exact in...
  8. Shadyman

    Pixelart sprite tearing

    Hi all! I am experimenting with some pixelart and I've run into this issue that in each row and column somehow the sprites have some issues, see picture below. I have tried resizing the application surface but this didnt really help. I have the feeling that I need to draw this stuff on the...
  9. T

    GMS 2.3+ Help with sprite atualization

    Is there a way to create an object, but with sprite number not starting in "0" ? For example, I need to make a character change when a key is pressed, but, when the key is pressed, if the direction of the character is right, I need to use the first image of my sprite [0], if the character is...
  10. NovemberTender

    SOLVED animation won't go through all the sprite frames

    if tool != WEAPON.NONE and sprite_index != playersprite[playerstate,PLAYERSTATE.ATTACK] and mouseRight { playerattacking = true; } if playerattacking == true { sprite_index = playersprite[playerstate,PLAYERSTATE.ATTACK] if image_index > image_number - 1 {...
  11. Heavybrush

    drawing a sprite on a text using a text alpha

    hello guys I'm trying to make a particular effect I need to mix a text drawn by code and overlap a sprite to use a particular blend mode the only thing, I don't want to break the background, i need it only on the text maybe using gpu alpha?? ps: as a plus, by any chance, there is a way to...
  12. ZacKow264

    SOLVED Stop alpha from blending?

    How can I draw a primitive shape or a sprite with a certain alpha, but not have the alpha values add together when they overlap? I've tried disabling alpha blend, but that seems to set the alpha of everything back to 1. For instance if I have two rectangle draw at 0.5 alpha, if they overlapped...
  13. D

    SOLVED Camera center code is making sprite displace when it moves

    Hello, i've been noticing that my sprite gets displaced to whenever direction i add speed and it gets worse the higher the speed. Then i've made a test removing my center camera code and it seems that for some reason the problem happens when the camera is centered on my player. This is my code...
  14. VR456

    Legacy GM [Solved] Change position of a sprite made with Draw event

    I want to achieve a simple effect in GMS 1.4 – when a level finishes, "level_complete" sprite generates out of bounds, and then "falls" down to a certain position. I thought something as simple as a block of Draw event code (inside an object for stage control) below would work, but it just...
  15. Joifad

    Windows Animation of my character doesn't work properly

    The code I wrote is exactly like this: //Update Sprite function PlayerAnimateSprite(){var _cardinalDirection = round(direction/90); var _totalFrames = sprite_get_number(sprite_index) / 4; image_index = localFrame + (_cardinalDirection * _totalFrames); localFrame +=...
  16. FrostyTBB

    GML How to get a sprite to play it's full animation before switching

    Hello! For a few days now I've trying to set up an animation to play when I press the space bar, and I want it to go through the full animation. However, It usually only plays for one or two frames before being overwritten by the idle or movement sprites, when I'd like for it to stay there for...
  17. A

    How do I change sprite animations after picking up a weapon?

    Hello everyone, I have imported a sprite sheet featuring my character running with a weapon. I was hoping to use this animation after the player picks up the weapon object. However, I'm unsure about how to insert the animation into the code. I know it has to take the form of an if statement...
  18. S

    How to execute a sprite only once

    I'm making a 2D plataformer game, and I want when my character touch the wall, I want to execute a sprite but only once, but the sprite start a loop. Anyone can help me? I'm new on this :c
  19. Dagoba

    GML Sprite inside of a string?

    Hey, is there a possibility to have a sprite inside of a string message? I am creating a sign that guides the player and in the message it should display like: "Press X to Jump". The X would be replaced with a sprite of X, because the player could for example modify their keyboard settings and...
  20. foreverisbetter

    GMS 2.3+ [SOLVED] simple collision with rotated sprite not working

    Hello, surprisingly I didn't find the question already asked here in the forum: why is an instance running one pixel into a wall to its left when it rotated around 180° ? The sprite is 16x16 pixels, the origin is the middle center and its collision is set to be precise. the movement code is...