190,958

Views

Beginner

Level

13

Comments

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:

  1. Click the Dashboard tab.
  2. Click on Actor Types (this may already be highlighted).
  3. Click the dotted line box to create a new Actor Type.
  4. Name the new Actor Type "Enemy Ship".
  5. Add an animation and Add a frame to import the "Alien_grabber.png" image.
  6. 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.

Bullet Actor Type

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.

Click here to go to Part 5.

Disclaimer: Use comments to provide feedback and point out issues with the article (typo, wrong info, etc.). If you're seeking help for your game, please ask a question on the forums. Thanks!

13 Comments

LittleMike
I can confirm what pollywoggles said. You cannot select anything for "Affected by Gravity?" if you have "Cannot be pushed" selected. The option becomes grayed out.
0 6 years, 2 months ago
pollywoggles
In Step 26 it says to select the same physics settings as Ship and Enemy Ship, but the first radio button "determine whether the Actor Type can move or not" (it is "Normal" (Ship) and "Cannot be pushed" (Enemy Ship)). I selected "Normal" for the bullet.
1 6 years, 2 months ago
pollywoggles
On step 23, it looks like you first have to set the radio button "Affected by Gravity" to "No," because if it is disabled after you select the "What Kind of Actor Type?" radio button "Cannot be pushed"
1 6 years, 2 months ago

Sign In to Comment