unterschied zwischen image_single und image_index

  • GM 8

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • unterschied zwischen image_single und image_index

    Hallo,

    ich habe eine klitzekleine Technische Frage:

    Was ist der unterschied zwüschen

    GML-Quellcode

    1. image_single

    und

    GML-Quellcode

    1. image_index


    image_single gibt es nicht in der auto-code-vervollständigung, aber image_index schon.

    Und da frage ich mich, was ist da der unteschied. beides funktionirt ja.
    Kopiere dies in deine Signatur, um es in deiner Signatur zu haben.
    Achtung: Dieser Beitrag läuft ende des Monats ab, bitte lese ihn noch vor dem Monatswechsel...
    Nach langer zeit wieder im Forum aktiv :D
  • The image_single local variable is the variable that defines (in a different way than image_index) the current subimage of the current selected sprite. A sprite in meaning is an graphic with multiple "sub-images", every sub-image in Game Maker has an index, starting from 0 (which is the main, first, image) and ending with whatever the user decides should the number of subimages be.

    A sprite of an object, by default is constantly moving, so whatever was the value set to if it was a positive integer less than the number of sub images, the sprite would keep animating. However, without the need for image_speed, setting image_index to -1 pauses the progression in the sprite's subimages while keeping the actual subimage of the object's sprite.