Crash Course 2: Invaders - Part 4
by Hectate (Updated on 2015-01-31)
Part 4: Creating More Actor Types and Importing a Background
Step 21: Now that we have our new Collision Groups, we need to create our Enemy Ship Actor Type. Use the same steps as you used to create the Ship Actor Type to create the Enemy Ship. Here’s a brief reminder of the steps involved:
- Click the Dashboard tab.
- Click on Actor Types (this may already be highlighted).
- Click the dotted line box to create a new Actor Type.
- Name the new Actor Type "Enemy Ship".
- Add an animation and Add a frame to import the "Alien_grabber.png" image.
- Rename our first animation to "Normal".
Step 23: We’ve created our "Enemy Ship" Actor Type and added an animation. Like we did with the Ship in previous steps, we need to set its Physics settings. Let's change our Enemy Ship to the following settings:
- What kind of Actor Type? Cannot be pushed
- Can Rotate? No
- Affected by Gravity? Disabled by Stencyl (you do not have to change it)
Step 24: Choose its Collision Group by clicking the Properties tab and setting its Group to Enemies, as shown.
Are you missing the Enemies and Bullets groups? You need to go back to Part 3 and create them!
Step 25: Next, we need to create the "Bullet" Actor Type. Follow the same steps as you did to create the Ship and Enemy Ship but name the new Actor Type "Bullet". Note that when importing the graphic for the Animation, set the number of Columns to 3, as shown below.
Step 26: We want to have slightly different Physics settings for the Bullets.
- What kind of Actor Type? Normal
- Can Rotate? No
- Affected by Gravity? No
Lastly, we set our Bullet Actor Type’s Collision Group (in the Properties tab) to Bullets.
Step 27: With our Actor Types created, we need to import a Background image to use in the Scene we’ll create later. Click the Dashboard and then on Backgrounds.
Step 28: In the dialog that pops up, name the Background image Stars and press the Create button.
Step 29: Click on the "Click here to add a frame" on the left, then on Choose Image, and select the "Space Background.png" image from the assets.
Have you saved recently? Now would be a great time to do so if you haven't!
Now it's time to import our sound assets.