Next up, we're going to create some basic enemies for our game.
If you haven't already read Tutorial #5, you should check it out first. Or, start at the beginning, if you're new to the series!
Lets icon a couple of basic enemies to murder our smiley hero.
Step 1.1 First, lets make a new icon file for our enemies.
File > New > Icon File Type > Name: EnemyRed.dmi
(Covered in Tutorial #1)
Step 1.2 Now, we're going to make an animated icon_state for this enemy. Though this one will only change directions.
Click the movie camera at the top of the icon file.
Step 1.3 Now use the settings in the bottom left to drop the frame count to 1
Step 1.4 Double click any of the frame boxes to edit them. Put an angry smiley in each one, facing to match the directional arrow on the left. Keep him small!
You can use the tools at the bottom to quickly rotate or flip an icon_state
Step 1.5 Now we're going to create an animated attack state. Use the back arrow in the far right to exit out of that icon_state. Then click the movie camera again.
Step 1.5 This time, drop the frame count to 2. Then paste the frames you just created into this icon_state. You can drag to select multiple frames at once for copying/pasting.
Step 1.6 In the 2nd set of frames, move mr angry smiley to the edge of whatever direction he is facing. This will make him look like hes stabbing forward to attack you. This is also why we kept him small - for movement room! You should be able to see his animations playing on the left of the frame editor.
Step 1.7 Press the back button until you're back at the icon file. Right click our new icon_state and name it Attack. This was also covered in Tutorial #1, when making our Grass and other turfs.
You can follow these steps to create an attack animation for the smiley hero if you'd like.
Cheaply Reusing Graphics
Lets duplicate our red enemy with a quick recoloring.
Step 2.1 Create a new icon filed named EnemyGreen.dmi
Step 2.2 Jump back over to the original EnemyRed.dmi icon file, and select both icon_states. Then copy them with ctrl+c.
Step 2.3 Now move into EnemyGreen.dmi, and press ctrl+v, to paste the selected icon_states here. EnemyRed.dmi and EnemyGreen.dmi should now look identical.
Step 2.4 Select Colors > Edit... from the file menu
Step 2.5 Double Click the red swatch and select a new color. I'll be making mine a bright green. Press OK to finish.
Those simple clicks replaced all of the red in the icon with green, so we now have a "new" enemy!
Contine to Tutorial #7: Battle Systems
Copyright © 2021 BYOND Software. All rights reserved.