• 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!

image_index

  1. 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?
  2. O

    GameMaker Image_index returning values that don't match with image_number

    Hello! So my state machine appeared to be working however when I tried to look at shaking the screen at certain images within a sprite I ran into an issue. The value of image_index is not adding up...it doesn't want to go over more than about 3.33 even though the sprite has 10 frames...now to...
  3. D

    HTML5 image_index in HTML5

    Good day. I've got a problem with the variable "image_index" in HTML5 and I don't know if it's my or GMs fault. The problem is that in Windows VM and YYC, you can set image_index to decimal values like 1.5, 1.82, 2.3 etc. and in HTML5 you can't. If I do "image_index = 1.6" in HTML5, the...
  4. BithSnake

    GameMaker Make footstep sounds at specific frames [SOLVED]

    Hi, Ok first of all i know this question has been up several times but i feel like there has´t really been a really good answer to this. How do you tackle this problem where you want to play a specific sound on a specific frame(image_index) in a sprite_index ? I have gotten this to work...
  5. S

    Legacy GM [solved]make player change image_index for a whole jump

    I making a platformer and want my player to switch his image_index for a whole jump. My problem is that at the climax of my jump the image_index switches for an instant. I could use an alarm when jumping so the player is always in the wanted sprite but I think this is cheap. Is there a better...
  6. S

    Legacy GM [solved]Switch image_index 0 and 1 and ignore image_index 2

    I am making a platformer and I want my player to duck. I have two possibilities. 1. Make the player switch between sprite_index(doesnt work because I also must switch to my power up sprites) 2.Make the player switch between the image_index I think its more practical to do it with the second...
  7. 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 =...
  8. M

    Legacy GM Check when image_index changes

    I need to check whenever a sprite's sub-image changes. This is so I can change the music when the background changes. I have it so the background is dependent on one sprite. My code is shown below with the second part being the music code I started adding. ///Backgrounds background_visible[1]...
  9. Axl Trauts

    image_speed not working

    Hi, I am really confused here. I made my player object fire a missile that "goes to the sky", that is, disappears and when it does, it creates rain. Like a rain missile :P Anyways, the thing is that the rain sprite does not animates at all, it has 4 subimages. This is what I did on the Missile...
  10. B

    HTML5 Wrong FPS

    My game frames per second is 60. The image_speed is 1/4. But my sprite randomly skips subimages, and if I draw the image_index it shows it is incrementing randomly by either 0.25, 0.50, 0.75. 1, 1.25, or 1.50. Yet if I use show_debug_message() to log the image_index every step, it logs the...
  11. SubWolf

    GameMaker [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...
  12. I

    Issues with image_index

    Hey, so I'm trying to trigger a room_goto() event when my player's sprite is at frame 31, which is the last frame of the sprite animation. But it isn't working at all, it's just looping the sprite. I'm using a script to change character sprites so this is my code: if...
  13. M

    Trying to do a King Crimson effect

    First things first, im trying to skip 30 frames of all objects with: all.image_index +=30 30 is the number of frames that supposedly are skipped, but that doesn't work how do i target all objects to skip 30 images?
  14. Turkish Coffee

    Legacy GM The Magic Numbers in the image_index [SOLVED]

    Hey, I have a ballista object that shoots an arrow when if statements are true like below; if (state == "ready" && (collision_line(x+24,y-8,x+TowerRange,y-8,oEnemy,true,true)) && canAttack == true ) //I'm using state to say if the ballista can attack or not but I just tried adding another...
  15. PlayerOne

    GameMaker Animation wont stop if it has more than 10 frames?

    To make a long story short I'm trying to make cut scenes for my game but I ran into a strange issue. Every time I run this script sprites that have more than 11 frames of animation will just play in a endless loop. What is suppose to happen is that the script ends when the animation finishes...
  16. G

    image_index = other.var won't work....

    Hey all! I'm having trouble with this and I was wondering if I was breaking a rule or if there was something else I needed to try. So my ultimate goal here is that if my character is sneaking, and he's by a door, and you push and hold the action button, then each time you tap the forward...
  17. E

    Image_index vs image_number

    What is the difference between image_index and image_number? As I get from documentation: sprite_index - name of sprite, image_number - number of frame, what is image_index then?
  18. S

    GameMaker (SOLVED) clamp sprite animation to certain subimage range?

    hello I am trying to create a menu system that uses 1 sprite for changing menus and being selected my sprite layout is like this.. -disabled -enabling frame 1 -enabling frame 2 -enabling frame 3 -ready -selecting frame 1 -selecting frame 2 -selected which is a total of 8 frames per sprite...
  19. B

    image_index Out of Sync

    What would be the best way to sync the image_index of the same objects that have been recently activated. I had to deactivate instances a certain radius away due to lag problems but this results in objects having animation out of sync. Thank you!
  20. G

    [SOLVED] Punch issue: image_index and hitbox

    Hi, everyone. I'm from Brazil, so sorry if I make any language mistakes: I've been learning and practicing Game Maker for a month. At the moment I'm working on a very very simple boxing game. Nothing complex or fancy. I'm just getting a player and an enemy to punch each other. That's all...
Top