sprite change

  1. i_am_virgo

    GMS 2 the size of my sprite changes when i flip the image - can anyone help out?

    context: so i'm currently working on a princess peach themed game as a birthday gift for my sister, and i am quite new to programming. i've been following the general Shaun Spalding platformer tutorial to get a feel for GML, and i've run into a problem when trying to flip the sprite when the...
  2. M

    Change sprites when moving left?

    Hi everyone, This is another bit of code I haven't been able to work out on my own, despite finding similar posts; I am a beginner! I am making a platformer where I am using left and right facing sprites for idle, running, jumping, etc. The code I am using for changing animation was acquired...
  3. UnderdogKeeper

    GMS 2 GML, How to Change Sprite depending of a mouse placemant?

    Hello, guys and gals. I'm very new to the GameMaker, and even newer to this place. So I hope I'm posting this in a right thread, and I hope my problem will not irritate you or something like that. Before all of this I just want to repeat that I'm a rookie beginner, so all of this stuff is pretty...
  4. William Garrison

    GML Unique Object Collision

    I have a Collide event with the character that swaps the sprite of a flower to an animated sprite. Problem is when the character triggers that one flower then ALL the instances of that flower object change sprites. Can you point me in the right direction to fix it so just the one flower reacts...
  5. I

    GMS 2 How to change sprites

    So I want to make a sprite change based on mouse_x and mouse_y , so when mouse_x is less than object's x, then the sprite changes to this one which is turned left, and the same thing with y value. I have this line of code: if (x < mouse_x) sprite_index = spr_playerR; if (x > mouse_x)...
  6. G

    Change sprite when walking through obj and then back

    I'm having trouble getting this sprite to start and stop when it should. I was wondering if anyone could help? Basically I've got a window object that, if it's open and I try to walk through it, he jumps through it. The Alarm[0] code resets 'timer' to 0 and sets the trig_jump% vars to false...
  7. N

    Question - IDE Enlarging sprite made paintbrush tool smooth

    Enlarging sprite lost snap function in the sprite paintbrush tool. How to fix? When I first started creating sprites, there was more of a low rez grid effect and the color would snap to fill only one block at a time. Once I enlarged the sprite, I lost that functionality and the brush tool...
  8. M

    Graphics Player/Hero - armor

    Trying to make my first platform game. I want my player/hero to be able to find different armor and weapons. But Im not sure how to design this. It will be a lot of sprites if I need to do a completely new sprite for each armor. I like the idea if I could do it with layers or in some other way...
  9. P

    Drag And Drop Child Ojects Changing Because of Parent

    Hey, I'm a beginner to GameMaker and I'm having some difficulty with two of my objects changing their sprite because of their parent object. I have the child objects (the boots) change their sprites depending on the direction the character moves. I have also set the parent object's (ship body)...
  10. C

    An Inquiry About Sprite Control

    Hey All! I have finished a game. Well, "finished" in the sense that I have all the programming and mechanics, but no art. I was going to make some animations for my player, but don't know how to control that. For starters, how would I make my character walk down/left/up/right and change between...
  11. T

    enemy won't change sprite based on direction

    I'm using the enum and motion planning function for the first time in an attempt to create AI for a 2D Action RPG. I'm wondering why my enemy's sprite won't change at all when it changes direction. Also, based on what I have, do you think I am on the right track for making sufficient AI. Create...
  12. supercomputer276

    GMS 2 Trouble with Collision Masks of Sprites Created from Surfaces

    I'm attempting to test a gameplay concept of erasing parts of a solid object to provide a path through. While I have managed to use surfaces to erase parts of the sprite's physical appearance, attempting to use sprite_collision_mask on the sprite created from the surface results in the same...
  13. F

    Legacy GM [SOLVED] Name a sprite in code

    Hi. I am making a game with loading sprites, but I need to name them something like "global.spr_walk". Is there any was to name a sprite, mostly because some levels are finished and it would take me days to set the names of the sprites in code in spr_walk to global.spr_walk?
  14. M

    GMS 2 [FEATURE REQUEST] Allow GML-access to sprite image layers

    Feature Request: Being able to toggle the visibility or adjust the alpha of a particular layer of a sprite-image through GML code would be very beneficial. Note that I'm not referring to a room layer, rather the layers that you can use in the GM Studio 2 Sprite Editor. Use-case: Sprite image...
  15. N

    Change object sprite based off of background sprite.

    I have two Objects, one is the Player Object and the other is the Background Object. If the players sprite turns blue or grey, I want the background Object to change its sprite to yellow or blue but only if the player is in front of or even touching the Background Object. In the Players...
  16. A

    Legacy GM Changing the sprite on KB pressed.

    Hi all :) I am having a bit of an issue and I guess it might be something silly that I just can't seem to get sorted. I have a character that moved right and left and I need to change the sprite so that he faces left when I press A and right when I press D. The code I have work's but the...
  17. M

    Legacy GM [Newbie] Changing sprites at spawn

    I have an object that i need to change it sprite when it spawns. I tried to do it but didn't work //create event eggform = random_range(1,9) //step event if (eggform = 1){draw_sprite(spr_chocolateegg,-1,0,0)} if (eggform = 2){draw_sprite(spr_whitechocoegg,-1,0,0)} if (eggform =...
  18. J

    Help with 8 Directional Movement/Collision/Sprites

    Hello, I am pretty new to Game Maker, and completely new to coding! I've picked up on a few tricks from watching some videos on how to code 8 directional movement. I have been able to get the 8 directional movement to work, and I have even been able to get a corresponding directional sprite...
  19. AtomicToilet

    Legacy GM [SOLVED!] Problem w/ player sprite change animation

    Howdy folks. My issue is, I can't get the player object to change sprites according to other button presses besides left or right (it's a sidescroller). I understand states are the way to go, but at the moment, a state change will have pretty much any effect I put in it on the player [eg, spd...
  20. M

    A problem with sprites

    I want to make my player change sprites when coliding with an object. Lets say I have 2 objects A and B. When the player colides with obj A the sprite is changed to sprite A and when it colides with B the sprite changes to sprite B. But how to I tell the engine: If the Player has Sprite A after...
Top