SETTING UP YOUR LEVEL
- First, create your room by right clicking and copying the room "level_template". Click on the "settings" tab in the room editor and change the name to (Your Username) (Level Name).
- Next, click on the room 'initiate'. Go to settings and click on 'creation code'. There, you'll see a line that looks like this:
//setUpLevel(1,level_test,"exampleMusic.ogg")
- This is the (commented out) code to set up your level with the level select menus and to set up music for it. "setUpLevel" has three arguments - level slot, level room name, and filepath to the music. The filepath to the music has to be in quotes, but the other two don't have to. Just fill in the relevant info and you're good! Be wary, though, the game only supports 5 level slots, but you really don't need more than 1 in this context...
- NOTE: YOUR MUSIC MUST BE IN .OGG FORMAT!
HOW TO USE THE EDITOR
- To place objects, select the "objects" tab on the interface on the leftmost side of the room editor. To select objects, click on the icon with the mouse towards the bottom of the interface. Then, a big popup will pop up, with tons of folders. Move your mouse over the folders to view them. Click on an object to set it to the object you're using, and then left click in the actual room to place it.
- To mass-place objects, hold "Shift" as you place them. To delete objects, right click them. To mass delete objects, just hold down the right mouse button and drag it along the objects you want to delete. To access an object's creation code, hold CTRL and right click it, and choose "Creation Code".
- To place blocks, select the "tiles" tab on the interface. Then, hit the icon with the mouse on it towards the bottom. You can then select from various "backgrounds" to use. Click on the tile you want to use, and place it anywhere.
- Tiles have the same mouse actions as objects, minus the creation code.
- To edit a room's height and width, and to edit its creation code, select 'settings'. DO NOT EDIT THE 'SPEED', 'ROOM CAPTION', OR 'PERSISTENT' options. Note that in order to have proper scrolling, width values must be a multiple of 256, and height values must be a multiple of 224.
- In order to add a background to your level, select 'backgrounds', click on 'Background 1' in the menu, check 'Visible when room starts', and click on the mouse icon to choose between a background. If you want to make your background a solid color, just click on the box next to the Color text and choose your color.
- To edit your spawn point in the level, select 'views', and edit the X and Y options for 'View in room'.
LEVEL EDITING POINTERS AND TIPS
- To avoid making unneccesary clones of objects, many enemies have "variations" that you can set by modifying the individual object's "creation code". To modify this, simply right click an object while holding the Control key and select Creation Code. The coding interface will pop up. All you have to do is type in "variation = (variation number)", with the variation number of the enemy being listed below. If you do not set the variation, the object will default to its first variation. If you set the variation to anything other than a listed value, the game will likely crash, so don't do that!
- Some enemies have variations, ranging from simple color changes to custom variations with harder or easier attributes.
- Usually, you want to make sure to uncheck the 'Delete underlying' box in the bottom left. Unchecking this box stops Game Maker from deleting objects that intersect each other. The only time you really want this checked is if you're filling blocks/ladders, to prevent unneccessary duplicate objects.
- If you want to connect your screens instead of making them all individual and apart from each other, use the object called 'camera_setting'. Place that at the top left corner of the first screen in your row, then go into the creation code and type "numberOfScreens = (number of screens you want)".
- To add a checkpoint to your level, place 'checkpoint_setting' in the top left of the screen you want to make a checkpoint, and then place 'teleport_block' objects around the center of the screen. These objects will define where Mega Man lands when he teleports in. You can have as many checkpoints as you want. Just make sure to not place one in the middle of a stretch of connected screens, otherwise the scrolling will be messed up.
- Make sure that if you want to connect two screens downwards vertically, you place the object 'holedoor' at the bottom of the first screen.
- Extend your tiles that touch the top of the room 2-3 tiles above the room. You can place tiles up there, even if you can't see it in the room editor.
HOW TO USE CUSTOM SPAWNERS
- Custom spawners are pretty powerful. With it, you can spawn any object in the game with any piece of code you can write. I'm not going to go into meticulous detail on how to do tons of different settings with these (consult your local Game Maker help file for that), so here's a general description of how they work and a thing you can do with them.
- There are two types of spawners - interval (red) and continuous (green). These are labeled appropriately in the files.
- Interval spawners will spawn one object at your defined interval. Continuous spawners will endlessly spawn an object at a designated interval for a designated amount of time, before shutting off and waiting another designated amount of time. Remember, for these time values, 60 = 1 second, 30 = half a second and so on.
- Interval spawners require three values to be inputted - "code", "interval", and "object". "object" is the object the spawner will create (look at the list below for object names), "interval" is self-explanatory, and "code" is anything you might want to put in the creation code. Your code must be formatted 'like this'. If you do not want any creation code, just put code = ''.
- For example, if you want a spawner that spawns an orange Killer Bullet every two seconds, you would input this in the spawner's creation code:
interval = 120;
object = killerbullet;
code = 'variation = 3';
- Semicolons are not required. You don't have to have exact spacing as well so you could just do "interval=120" or "interval =120" or "interval= 120" if you're so inclined.
- The same applies for continuous spawners, except there are some extra variables. You still have to input "code" and "object", but there are three interval variables involved - "spawnInterval", "stopInterval", and "waitInterval". These are the gap between the spawning of objects, how many frames until the spawner stops, and its cooldown time, respectively.
- For example, if you want a spawner that spews 10 regular bullets straight downwards with a gravity factor of 1 for 10 frames and then wait half a second before spawning again, you would input this -
object = standard_bullet;
code = 'grav = 1; sound_stop(sfx_enemyshoot); sound_play(sfx_enemyshoot)';
spawnInterval = 1;
stopInterval = 10;
waitInterval = 30;
- The sound code is not required, but it is nice to have sound for your spawners.
NEAT CODING THINGS
- This is mostly for custom spawners, but this can also be applied for custom resources and creation code and such.
- Most enemies in the game have "hsp" and "vsp" variables, and some have a "grav" variable. "hsp" and "vsp" are horizontal and vertical pixels per frame, respectively. "grav" is gravity, and you'll generally want this to set to "1". This is the same gravity constant Mega Man uses on land. "0.5" is floatier, and "0.75" is in between.
- If an object does not have "hsp", "vsp", or "grav" variables, you can substitute them with "hspeed", "vspeed", and "gravity" + "gravity_direction = 270".
- Some variables might be nice to know. Mega Man's health is "global.health". His E-Tank and W-Tank values are "global.tanks_e" and "global.tanks_m" respectively. The power of his charge shot is "global.csp".
- You can change Mega Man's keys. The variables are "global.key_up", "global.key_down", "global.key_left", "global.key_right", "global.key_a" (jumping), "global.key_b" (shooting), and "global.key_start" (pausing). For letter and number keys, type ord('key'), with 'key' being the letter/number of your choice (surrounded by ' on both sides). For something like Shift or Ctrl, it will be vk_key with key being the key you want, decapitalized. If this doesn't turn red in the code editor then you typed it in wrong. The Game Maker help file has a full list.
ENEMY, CODE AND OBJECT NOTES
- Make sure that when using any floor-tracking enemies (Spines, Spring Heads, Electric Gabyolls, and Garyobies) you set their boundaries by placing "marker" objects where you want them to turn around, unless you want them to run off ledges.
- You can use the same "marker" objects to make Shield Attackers turn around prematurely, and make Crabbots turn around.
- There are 8 slots for yoku blocks. They will appear continuously in the order they're numbered.
- For code/custom spawner purposes, the standard_bullet object, which is used in almost all projectile-shooting enemies, will disappear if you set alarm[0]. So if you wanted to have a bullet only appear for a second, you would type in its creation code alarm[0] = 60.
- Many obstacles and dynamic platforms have settings you can set in their creation code to change their behavior. These are listed in the 'ELEMENT VARIABLE LIST' section.
- If you're going to create new enemies, copy existing ones, otherwise you're in for some pain. Make sure to modify their 'User Defined 15' event to have the object's name instead of whatever you copied it from.
- Make sure to place Have Su Bees (the massive bees that carry hives) where you want them to fly TO, not where you want them to fly from.
- Make sure to place Monkings (the Mega Man 2 monkeys) in the position you want them to fly and grab to.
- Make sure to place Parasyus, Moles, M44As, Bombombs, and various other enemies that come down from the sky or from the bottom of the screen inside the screen you want them to appear in. Don't place them offscreen or they'll get scrolled offscreen.
- If you want to place a gear + clown combo like in Metal Man's stage from 2, JUST place the gear. The clown will automatically appear and land on the gear. You don't have to do anything else special.
- The "lowgravity_setter" (the moon) and the three purple gravity objects have different uses. The former, when placed, will apply low gravity globally throughout the entire level, so only place one. The latter three objects change Mega Man's gravity when he touches them, so place them as if they were blocks.
ENEMY VARIATION LIST
Met Beta & Charging Met & Scuba Met & Metrain
1 - Default mode.
2 - The shots are lined up instead of the top and bottom shots being slightly behind.
3 - Will only shoot the center shot.
4 - Shots are twice as fast.
Blader
1 - The enemy will be green.
2 - The enemy will be blue.
Spine
1 - The enemy will be blue.
2 - The enemy will be orange.
3 - The enemy will be blue and always at max speed.
4 - The enemy will be orange and always at max speed.
5 - The enemy will be blue and always at minimum speed.
6 - The enemy will be orange and always at minimum speed.
Killer Bullet
1 - The enemy will be red.
2 - The enemy will be blue.
3 - The enemy will be orange.
Beak
1 - The enemy will be orange.
2 - The enemy will be red.
3 - The enemy will be blue.
Octopus Battery
1 - It will be red and start moving downwards.
2 - It will be red and start moving upwards.
3 - It will be red and start moving leftwards.
4 - It will be red and start moving rightwards.
5 - It will be orange and start moving downwards.
6 - It will be orange and start moving upwards.
7 - It will be orange and start moving leftwards.
8 - It will be orange and start moving rightwards.
9 - It will be blue and start moving downwards.
10 - It will be blue and start moving upwards.
11 - It will be blue and start moving leftwards.
12 - It will be blue and start moving rightwards.
Flea
1 - The enemy will be blue.
2 - The enemy will be red.
Screw Bomber
1 - The enemy will be orange.
2 - The enemy will be blue.
3 - The enemy will be red.
Watcher
1 - Starts moving downwards.
2 - Starts moving upwards.
Fan Fiend
1 - Normal behavior.
2 - Pushes you twice as hard.
3 - Pulls you in instead of pushing you.
4 - Pulls you in twice as hard.
M445
1 - Starts moving downwards.
2 - Starts moving upwards.
Mole
1 - Starts moving downwards.
2 - Starts moving upwards.
Garyoby
1 - The enemy will be red.
2 - The enemy will be orange.
3 - The enemy will be red and always at max speed.
4 - The enemy will be orange and always at max speed.
5 - The enemy will be red and always at minimum speed.
6 - The enemy will be orange and always at minimum speed.
Power Muscler
1 - The enemy will be red.
2 - The enemy will be green.
ELEMENT VARIABLE LIST
To use these, go into the creation code of the object and type in the name of the variable, then an =, and then the value you want to set it to. As a general rule, -1 for any 'dir' variable is left, and 1 for any 'dir' variable is right.
Yoku Block: 1 setting, 'variation', which changes the sprite.
1 - Mega Man 4, Wily Stage 1
2 - Mega Man 6, Wily Stage 2
3 - Mega Man 5, Proto Stage 1
4 - Mega Man 2, Heat Man
5 - Mega Man 1, Elec Man
6 - Mega Man 1, Ice Man
7 - Mega Man 9, Plug Man
8 - Mega Man 9, Endless Mode
9 - Mega Man 10, Sheep Man
10 - Mega Man 10, Enker
Elec block and fire block: 2 settings. 'dir', which is self explanatory, and delay, which is the on/off timer. If you want it to shoot right, type dir = 1 in the creation code, and dir = -1 for it to go left. They will default to right. To change the delay, put delay = (your number here) in the creation code. It will default to 60 (a second in real time).
Stationary magnet: 1 setting, 'dir'. Self-explanatory. Defaults to right.
Quick laser spawner: 3 settings - 'delay', which is how many frames until the spawner shoots the lasers, 'dir', the direction (same values apply to this as the rest), and 'laserspeed', the speed of the quick lasers. delay defaults to 1, dir defaults to 1, laserspeed defaults to 16 pixels per frame.
Gutsman lift: 1 setting - 'dir'. Self-explanatory. Defaults to right.
Crashman lift: 3 settings - 'mdir' is the direction. Unlike other direction variables, you have to type out your direction. So 'up' for up, 'down' for down, 'right' for right, 'left' for left. 'hsp' is the starting horizontal speed. Negative numbers are left and positives are right. 'vsp' is the starting vertical speed. Negatives are up and positives are down. Keep these consistent with your mdir, otherwise glitches may occur. The lift defaults to going straight up.
Poking needles: 1 setting - 'dir'. 1 is down, 2 is up, 3 is left, 4 is right. Defaults to down.