Game Maker and GML thread - Printable Version +- The VG Resource (https://www.vg-resource.com) +-- Forum: Archive (https://www.vg-resource.com/forum-65.html) +--- Forum: July 2014 Archive (https://www.vg-resource.com/forum-139.html) +---- Forum: Other Stuff (https://www.vg-resource.com/forum-6.html) +----- Forum: Questions, Info, and Tutorials (https://www.vg-resource.com/forum-89.html) +----- Thread: Game Maker and GML thread (/thread-21689.html) |
Game Maker and GML thread - ZeldaClassicEXPERT - 10-15-2012 Please do not worry though, this thread and post is extremely easy to understand. Uploads are okay if all of the four conditions are met: #1: legal #2: safe #3: allowed #4: permissioned GML stands for Game Maker Language III stands for 3 NES stands for Nintendo Entertainment System Talk about Game Maker, GML etc. here Example: Code: Just like in Mega Man III for NES Code: Just like in Mega Man III for NES RE: Game Maker and GML thread - Gors - 10-15-2012 What is this topic's objective? Are you just posting GML codes, or is there a question and/or tutorial here? I'm tending towards the latter, so it might be interesting, I guess. RE: Game Maker and GML thread - Previous - 10-15-2012 I doubt anyone will be able to make use of the posted code oput of its context. It also isn't the most elegant way to code such a selection. I'm pretty sure MM3 on the NES didn't check for collisions between the selection marker and stage icon to determine the position. You have nine stages. Easy solution would be to have a variable for the selection with values from 0 to 8 - let us call if selectionVar for fancyness. Interpret the stage icons like this: 0 1 2 3 4 5 6 7 8 When the selector has been moved, place it at the position of the appropriate stage icon. To move the selector to the left (<-) you can simply subtract 1 from the current value. Code: if ((selectionVar % 3) > 0) { Why I use the modulo operator? To prevent moving from 3 to 2 (middle row to top row) for example. What it does? This: 0 % 3 = 0 1 % 3 = 1 2 % 3 = 2 3 % 3 = 0 4 % 3 = 1 5 % 3 = 2 6 % 3 = 0 7 % 3 = 1 8 % 3 = 2 So the selection will not move when it is on 0, 3 or 6 (the leftmost icons)! Fancy, isn't it? Move right: Code: if ((selectionVar % 3) < 2) { Move up: Code: if (selectionVar > 3) { Move down: Code: if (selectionVar < 6) { Afterwards, in every case independent of the direction, reposition the selection marker: Code: switch (selectionVar) { RE: Game Maker and GML thread - Phaze - 10-15-2012 sed 's/just like in Mega Man III for NES/' (You don't really need that on every single line. Just sayin') RE: Game Maker Games and Problems - Bombshell93 - 01-04-2013 please read the rules, To my understanding this is a place for game projects with sufficient information, not a help area. I'd advise game maker community for help with game maker. RE: Game Maker Games and Problems - Previous - 01-04-2013 We have the GameDev lounge for games-you-are-making-that-don't-need-their-own-thread-yet discussion. We have a QIT section for questions. I'm mergng this into the general GML thread we have somewhere. |