Arrays in GameMaker Studio – Part 1



Arrays are the foundation of data structures, and understanding how to use them opens up a whole new world of possibilities. Let’s learn about them now!
Array Projects:

Check out my GameMaker Studio course on Udemy for only $9.99:

Check out our website @ www.beyondusgames.com
Connect with us on Twitter @BeyondUsGames
Support us on Patreon @ www.patreon.com/beyondusgames

Outro Music courtesy of OC Remix.

Nguồn: https://anniesnannies-seattle.com/

Xem thêm bài viết khác: https://anniesnannies-seattle.com/game/

17 thoughts on “Arrays in GameMaker Studio – Part 1

  1. I have this in the create event

    menu[0] = 0;

    menu[1] = 45;

    menu[2] = 90;

    menu[3] = 135;

    menu[4] = 180;

    menu[5] = 225;

    menu[6] = 270;

    menu[7] = 315;

    image_speed = 1;
    ————————————————————–
    I have this in the spacebar event

    menu[irandom(array_length_1d(menu)-1)];

    if(menu == 0) {sprite_index = sguardwalke;}

    else if(menu == 1) {sprite_index = sguardwalkne;}

    else if(menu == 2) {sprite_index = sguardwalkn;}

    else if(menu == 3) {sprite_index = sguardwalknw;}

    else if(menu == 4) {sprite_index = sguardwalkw;}

    else if(menu == 5) {sprite_index = sguardwalksw;}

    else if(menu == 6) {sprite_index = sguardwalks;}

    else if(menu == 7) {sprite_index = sguardwalkse;}

    this is the error message I get

    Error : gml_Object_oguard_KeyPress_32(0) : malformed assignment statement

  2. how do I write this, outside of a 'text' ? I can't figure out how to write the random 'menu'
    menu[0] = "0"; //E

    menu[1] = "45"; //NE

    menu[2] = "90"; //N

    menu[3] = "135"; //NW

    menu[4] = "180"; //W

    menu[5] = "225"; //SW

    menu[6] = "270"; //S

    menu[7] = "315"; //SE

    menu[irandom(array_length_1d(menu)-1)];

    if(menu = 0){

    sprite_index = sguardwalke;

    }

    else if(menu = 1){

    sprite_index = sguardwalkne;

    }

  3. My friend, for some reason the machine translation subtitles are failing, can you please verify your video in video editing CC options and validate the overlap?

Leave a Reply

Your email address will not be published. Required fields are marked *