• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

sprite_index

  1. W

    GameMaker sprite_index is not working in a second player

    Hello, how are you? I'm working at a plataform game with two player, these two player are linked to father named obj_father_player. Where I programed the basic mechanics like: states, gravity, jumps. But in this game we have 9 characters, with many different sprites and skills. These skills are...
  2. ShortSoufie

    GameMaker Problem with Chest sprite index

    Hi, im new to gamemaker and cant figure something out. So i have a chest, it has randomized loot in it to give some sort of "rarity" to other items with a random function. I want to give this sort of glow effect to the rarity types, so when the chest opens, a "Common" item will give off a green...
  3. kingsushi001

    SOLVED Jittery sprite animation/direction

    Hi I have a problem with enemy sprites' animations being jittery when changing direction using mp_potential_step. Using mp_potential_step to have enemies follow the player and the following to change the enemy sprite based on direction: switch (direction div 45) { case 0: sprite_index =...
  4. P

    Change Sprites during jump cycle

    Hey everyone, learning some platforming basics and I'm hoping to make my jump look smoother. When the player leaves the ground I want a certain frame of animation and then when he's a certain height it swaps to the next, when he reaches his max height, I want to swap to the next etc. And...
  5. R

    SOLVED sprite change on a state machine

    hello guys, I have a problem that is quite annoying for me. I'm programming my player, and it has a few different sprites in addition to walking and standing animations, and in that I'm using a state machine to use it in a better way, but that's causing me a lot of trouble when switching to one...
  6. NovemberTender

    SOLVED sprite overlapping issue

    so the sprite idle animation, which is sPlayer, just continues to stay even if it shouldn't and i dont know what's wrong, i tried to rewrite it over again, but the same issue occurs. (heavily inspiried by shaun spalding) so i just removed "else" in between sPlayer, and sPlayerR, and for some...
  7. B

    issue changing between sprites of different frame count

    The issue I'm having is that my animation is freezing on image_ index = 0 , The initial sprite in use is made up of only one image ( spr_enemy) and in the code I switch it out for spr_EnemyBP which is made up of two images. The switch is made by a boolean variable that is set to true when my...
  8. M

    Character is always facing left once any key on the keyboard is not pushed anymore.

    Hello, i'm trying to assign basic movement/collision in my game but i'm having a weird problem I can't seem to pinpoint. All I have is one character and another object to test collision against. For some reason, whenever I release a key the left facing sprite is what is instantly snapped to. Am...
  9. A

    Windows Animation / sprite change with sprite_index

    Hi, I have two moving objects in my document: obj_playerA and obj_playerB (playerA sticks to the bottom and and playerB to the top, both can only move left, right or jump). I used the same animation code for both, except for small changes, like any vertical stuff. For some reason it works for...
  10. B

    Animation stuck on Frame 0

    I am having an issue getting an enemy to play his death animation before he is destroyed. if(CurrentHp <= 0 && sprite_index != spr_CrowFloor) { sprite_index = spr_CrowFloor; // if(image_index == 3) // {instance_destroy();} } if i set the image_ index == 0 the code works , the...
  11. conman06

    Difference between "Image_index" and "Image_number"?

    I am very very new. I know that Sprite_Index chooses which Sprite, I think Image_index chooses which frame of a sprite, and I have no clue what Image_number does?
  12. kureoni

    walking animations mouse directioned topdown

    im not being able to use the sprite_index to change the sprite animation based on the position of the cursor on the y axis (when the mouse is above the character, we should be able to see him by his back, and when the mouse is under the character, it should be the other way around) any ideas?
  13. D

    GameMaker I can't change image_speed when I change sprite_index

    Hello everybody, I'm trying to change my sprite_index, but when I do that I realized that the image_index is the same that the last time I used. How can I do to set the image_speed? "image_speed" doesn't work by the way. Thank you very much for your help! // vertical movement if frog_jump =...
  14. B

    Legacy GM [SOLVED] It's possible to leave a variable with no initial value?

    Is it possible to leave a worthless variable until a certain point in the game, even if its value grants a sprite_index a room-specific object? Or at least leave it with a default value that can later be changed by other values still in room_start? Well, whenever I start the game, I leave this...
  15. P

    How to set sprite_index to a string?

    Hello! (scroll down to see the crux of the issue) I'm making a game with RPG-style dialogue, where the different characters you talk to have different poses when they talk to you based on their emotion. The system has global variables that determine which characters are on the left and right...
  16. S

    Object only works correctly in one room.

    Hey there, I know this is so basic but could not find any previous posts that applied. I have an object that only exists to display/ change sprite based on player states. It works perfectly in roomA but always displays the same incorrect sprite in every other room. There are NPCs in these...
  17. C

    [SOLVED] Do sprites need to be in a particular order? (sprite_index)

    My game spawns randomly generated obstacles that choose from a list of sprites for a single "obj_walls" object ("spr_walls", "spr_walls1", "spr_walls2", etc...) and it it flips them along the x-axis (horizontally) when the player comes in contact with an "obj_flipper" object. It flips back to...
  18. JAG

    GML reset animation

    Hi there everyone, Im making a platformer, I have some jump and dash animations triggered with some scripts I wrote. It seems to me that whenever I set sprite_index to my eg jumping sprite, the animation does not start from the 0th frame. I tried setting image_index = 0 in my animation end...
  19. R

    Can't change sprite_index .. after changing room

    Hi everyone ! I post here, because I've a big and mysterious issue! I want to change a sprite for a blood effect, according to my player orientation (left, right, up, down). I have my sprites in arrays, because it changes according to ennemies. So I tried two ways : - I put my sprite attack...
  20. Y

    Legacy GM Really Help, Cannot set the requested sprite_index | No one?

    I have this code in my arrows (click on these to select character) image_index -= 1 (on left arrow obj) and image_index += 1 (on right arrow obj) these codes apply to cpu_object (which is the object I want to change sprite "character" ) in my selection room for that I'm using this code in the...
Top