image_index

  1. F

    Managing States and image_index - need help!

    Hello! I'm trying to code a Punch Out-like game and it's not going too bad so far! Tho, since I'm new to the whole coding stuff, I'm having some troubles cause I'm not sure how to code the collisions. At first I thought to use hit and hurt boxes but I wasn't sure it was the right thing to do...
  2. W

    [Solved]Organized code not running image_index.

    This is all done under my object "Main Character". ------------------------------------------------------------------------------------------ // CREATE any_key_pressed = false; // STEP if(keyboard_check_pressed(vk_anykey)) { any_key_pressed = true } if(any_key_pressed == true) {...
  3. R

    SOLVED Problems checking frame

    Hi everyone, I need help with a check I'm having trouble running. Well, in my game I have enemies that have attack animation, and when I need something to happen in that specific frame, I usually use "if(image_index == frame value I want)", but this time I can't do that. I don't know why it...
  4. keatto

    when calling an image, how to set its index to a single subimage?

    Working with DSLists, I'm calling a sprite with a hundred+ subimages/frames. No matter how I write it, there's some syntax error in getting it to show a particular index for an image. I'm about to create hundreds of sprites instead of using just one with multiple subimages., was hoping there was...
  5. J04N

    GML The Slide / Dash animation doesn't start from the beginning

    Hello everybody, i'm doing the player Slide/Dash animation for my game and i have a little problem, what happens is that when I do the action "slide" the character does not perform it in a normal way, since the animation does not start from the beginning and does not end up doing it in a...
  6. T

    Problem whit image_index

    So, I want to set image_index to 0 every time I press a button so the animation starts at the first frame, but I don't know how to make it play after that, the animation gets stuck at that frame. If I don't put image_index = 0; the animation can start at any frame depending on the previous...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. jigglypuff_fun

    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...
  13. 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...
  14. 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...
  15. shui.bdr

    (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...
  16. LeonDr

    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...
  17. 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...
  18. B

    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)...
  19. 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...
  20. 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...
Top