sprite index

  1. R

    [SOLVED] drive and attack

    hello guys, I'm having a little sprite problem. I am trying to make my character walk and attack while walking, well it works and I did it but the visual part I am having difficulty I have a sprite for him to stop attacking and another one for him walking and attacking, the problem is: he...
  2. jobjorgos

    SOLVED how to draw_sprite from sprite index number?

    function scrItemHover(argument0) { icon = argument0; //this is the sprite name, something like spr_wooden_sword or spr_iron_dagger draw_sprite(icon,0,mouse_x,mouse_y); } ERROR: draw_sprite argument 0 incorrect type (string) expecting a Number (YYGI32) In GM1.4 this worked fine to...
  3. JesusOnExtasy

    Windows Sprite_index (ping-pong) how to do?

    There is a sprite, it has 8 frames. how to make the sprite play like this: 1-2-3-4-5-6-7-8-7-6-5-4-3-2-1 help me please
  4. C

    GMS 2 Help! Sprite Animation

    So I am new with GMS and I am working on some player movement. I have used a premade sprite sheet for a place holder and have used multiple sprites for a walk animation. I did some tinkering around and I was able to get it working properly (ie when the user holds "A" the sprite moves left with a...
  5. P

    Wait Until Sprite Frame

    I’m fairly new at GML and I’m looking for a script that will make an object wait until the sprite frames have looped once before switching to a different sprite. Example: (sprite_index = sExample1) A button is pressed (if keyboard_check_pressed) Object of -1switches (sprite_index = sExample2)...
  6. F

    Legacy GM Why does sprite-switching break my room transition?

    I have a fade out/fade in room transition set up with a persistent player object. It worked absolutely fine until I started adding running animations to the player object. The following code now breaks the room change every time - it fades out but fails to switch to the new room. if speed > 0...
  7. B

    Weird glitch (possibly?)

    So for some weird reason, my code was working a while ago and quit. So I toggled with it and managed to get something out of it. This time, however, instead of changing it to the correct sprite like it was supposed to, it flickered in between two other unrelated sprites. Now I toggled it again...
  8. K

    Legacy GM Boulder crashing game on impact

    FATAL ERROR in action number 1 of Step Eventobj_dust for object obj_boulder: local variable __b__(100001, -2147483648) not set before reading it. at gml_Object_obj_boulder_CollisionEvent_10_1 (line 7) - if __b__ I'm not sure what is happening, as I am trying to get a projectile with a...
  9. D

    Wanting to change a sprites colour as it is moving in random direction

    Hi guys, first time on here, so apologies if this is obvious! I have sprite that is set to move in a random direction on creation, and bounce off the walls of the room. This is working fine, but what I want to do is have an alarm that counts down so it changes the colour of the sprite every...
  10. Z

    Animation when character idle & when moving?

    I have this character which has an animation when it is moving or idle by default. (using subimages) I want to change the animation into its jumping animation when I press the jump button. How do I approach this? Do I just change the sprite of the character? In my game, the character will...
  11. A

    Legacy GM Make character animation stop when NPC stops on pre-programmed path

    Hi there, I am quite new to GM and coding in general so please bear with me. I have programmed a NPC to follow a certain path and said that it should play certain sprite sheets when moving in a specific direction. Now that works well. But now I want my NPC to play the idle sprite when it...
  12. B

    Auto Facing Sprites (RTS)(GMS)

    I'm currently making an RTS (Real Time Strategy) game and i'm having trouble knowing how to make the sprites face the left or right in which they're going. You can place an object called goto they will travel to it and stop when they touch it. I would like to know how to make the sprite index...