256,822
Views
Beginner
Level
19
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:
- 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.
19 Comments
my screen won't match the screen shown above.
http://static.stencyl.com/pedia2/ch 1/cc2/image29.png
0
On step 23, if on the "Affected by gravity?" tab "Yes" is the option you have, select "Cannot be pushed" make sure you selected "Normal". While normal is selected, on the "Affected by gravity?" tab choose "No". Then change the "What kind of actor type?" tab back to "Cannot be pushed".
1
It won't let me import the background from my desktop, even though it worked for the other things before it.
1
You need to change the actor type to normal, then change the gravity. After that you can change the actor type to normal. :)
1
Step 23: When it told me that gravity was already disabled by Stencyl , it was stuck on "Yes", not "No". I feel like this is going to make the enemies fall towards the player and that would not be good. Anybody got any answers?
0
When I created the "Enemy Ship" and performed all the correct steps, I noticed that in the steps it had gravity automatically set by Stencyl to "No", but for me it had Stencyl automatically set the gravity to "Yes", is there any way to fix this?
1
whenever i add a background of big size like 640x480 it is reduced in the screen to 64x48 please help how to fix it
1
Step 29: You need to turn on the "Repeat Background?" option in the Stars background object so that the background will repeat once it is placed in the Level 1 scene.
5





