image_index

  1. K

    GML Get image_index when drawing sprites manually

    This isn't really an issue, just wanted to share a solution I found in case anyone else runs into this. If you draw sprites manually (ex. draw_sprite_ext), image_index can get messed up because it can return a decimal, and it can also increase larger than the image_number, basically...
  2. enique

    SOLVED Dynamically change image_index

    Using the code below I populate the room with an object, but I'm also trying to dynamically change the image_index of the object that gets placed down. For example the first object gets placed as image_index 1, then the next object that gets placed would be image_index 2, etc. for (var i = 0; i...
  3. Gunnar the Clovis

    SOLVED [SOLVED] Engine Bug / Objects drawing WRONG image_index in odd but reproducible ways based on image_number

    Hello, I sincerely plead that someone helps me with this, as I am going insane pulling my hair out trying to resolve this issue... This is a critical problem for me, and if I can't resolve it, I'll have to scrap months of professional work and move to different game engine. All code is posted...
  4. A

    Smooth Sprite Direction Change?

    Hello there! Hope you are all doing great. It's been a long time since i asked around forums about this specific issue i had but sadly those posts most likely no longer exist and my project was lost as well so deja vu i guess. Anyways straight to the topic. Is it possible for anyone to help...
  5. 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...
  6. jigglypuff_fun

    GMS 2.3+ GMS 2.3 image_index change reversal in 2.3.2.556?

    When upgrading to GMS 2.3, there was a significant change made to image_index when it's manually incremented, as documented here by a different user: GMS 2.3+ - image_index in GMS 2.3 | GameMaker Community (yoyogames.com) As such, I went through the tremendous effort of finding and fixing...
  7. D

    SOLVED Dash Animation Suddenly Cancels

    So, i'm creating a Dash function for my game and it's very simple, however, for some reason it's stopping before intended. Basically it works most of the times, but sometimes it stops right at the beggining, or in the middle of it. This is how i start the Dash. if...
  8. acid_kat4000

    mirroring entire image indexes

    so im in the middle of making a running animation(running to the right) for one of my characters, and because I have all the limbs of the character on different sprite layers, I cant easily just use the rectangle select tool and then the mirror tool, to make a running left animation, mainly...
  9. S

    (image index == x) in step event

    i need to do something in a certain frame of an object, the code i wrote is: if (image_index == 25) { image_speed = 0; } it's wrote in the step event and it's very simple, but when the animation reach that frame the animation speed doesen't sets to 0, it's like gamemaker dosen't even...
  10. L

    GMS 2.3+ Beta version available to trial membership?

    I am trying out game maker to see if it is worthwhile to convert my old c++ game to game maker so I have downloaded the trial version of game maker. After some initial frustration getting animation to work due to, what turns out to be, a bug on the image_index code. I found out that the issue...
  11. 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...
  12. bob97470

    GMS 2.3+ Setting image index does not display the expected sub image

    Encountering a strange issue in regards to image_index. problem is reproduceable. create new project create sprite and resize to 96x128. (resizing may not be necessary) create 29 frames and draw the numbers 0 through 28 in them. (drawing the numbers is not necessary, but helpful to see results)...
  13. G#m_Player2

    SOLVED Need help about managing sub images in one sprite sheet (animation)

    Hello GameMaker Community this is my first time using the forum and I don't have much knowledge in programming but as a starter I am willing to open for learning and understand the basics of gamemaker language. As a starter, I wanted to make a platformer game and I followed tutorials on...
  14. C

    new to gamemaker! why this doesn't work?

    Hi, I'm trying to make my character blink by switching sprites from 0 to 1, problem is that sprite 1 stays on too long, I need him to close his eyes for just half a second so I wrote this line of code to make the sprite 1 stay for 10 frames: It's a step event i = 0 Speed is 0.1 FPS but it...
  15. 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?
  16. OneDevGames

    GMS 2 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...
  17. 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...
  18. BithSnake

    GMS 2 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...
  19. SonicTheHedgehog+123

    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...
  20. SonicTheHedgehog+123

    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...
Top