265,893
Views
Beginner
Level
81
Comments
Crash Course 2: Invaders - Part 6
by Hectate (Updated on 2015-02-01)
Part 6: Creating a Scene
Step 32: Click Scenes in the Dashboard, then we need to click the dotted line box to create a new Scene.


Step 33: After we hit that button, a dialog (shown) will pop up that lets us set some basic parameters for your Scene. Note you can choose the size of your Scene either using Tiles (which will use the Tile Width and Height, as shown) or in pixels. In this case we’re using Tiles and will use the default values, as shown. Let's give it a name of "Level One", and then as usual, we click Create to get Stencyl to make our new scene for us.

Once we do, Stencyl will open up our new scene in the Scene Designer.

Step 34: To keep things simple, we’re only going to add the background image we imported earlier rather than add any Tiles. Backgrounds are one of the layer types we can have in our scene. To add one, we need to click the small + icon in the Layers list. In there we select New Background Layer.

Step 35: The "Choose a Background" dialog box will appear for us, and we can click on our Stars background and then click OK.

Step 36: Notice that our new Stars background layer is higher in the list than the default "Layer 0"? This means that if we try to add anything to Layer 0 it will be underneath our Stars background! Clearly this is not ideal, so to prevent this from happening, let's move the Stars background to the bottom of the Layers list. We can do this by clicking the down arrow at the bottom of the Layers list while the Stars background is selected.

Now our intial setup of the scene is done, and the main window of the Scene Designer should look like the image below.

Step 37: We’ve got our Scene, so let’s test it. Press the green Test Scene button and after a few moments we should see our Scene appear in a browser.


If the Scene appears, everything is working, and we can move ahead. If not, we can get help by clicking on the Need Help button and then choosing an option in the dialog that pops up. Let’s keep going
Step 38: Click the Actors tab in the Scene Designer, in the Palette on the right. You should see the three Actor Types you created earlier.

Step 39: Now we want to place individual Actors in the Scene. When placing actors, they are put on the Layer that is currently selected. As a result, we need to remember to click on Layer 0 to select it as the current layer.
To place actors, we use the Pencil tool as shown below; select it now if it is not already active.

With the Ship selected from the Actor Type list, Layer 0 selected (and above the background layer!) and the Pencil tool active, move our cursor over to the bottom-center of the Scene and left-click once. The Ship will appear. We only want one Ship for the player to control.
Note that we want the Ship to be within the scene boundaries, so don't put him in the grey "out of bounds" area! Put him inside the scene like in the image below.


Step 40: Next, select the Enemy Ship so we can place a few in the Scene. We can use the Shift key to space them evenly as shown in the image below.

Step 41: Now we have a basic, complete Scene. Make sure it works via the Test Scene button again. We should see your Ship at the bottom of the Scene and the five Enemy Ships hanging out near the top.

We've got our Actors and Scene set up, so now it's time to start learning how to use Stencyl's Design Mode. To start, we're going to add background music to our Scene.
81 Comments
Every time I import assets the Alien Grabber's behavior Alien Movement imports missing key behavior blocks such as Slide and Increase speed as well as any other logic that is associated with this. It makes this impossible to complete at this point because I can't compile and test the scene as the code is filled with blank chunks of 'if' statements. I am not sure if this is my issue, or an issue of the assets being incorrect or broken, but it is extremely frustrating.
0
If you get to step 34 and have an Atlases tab instead of a Backgrounds one, go to the lower right of the screen where there's a box with "Layers" and "Inventory", and at the bottom a , -, up and down arrows and another icon. Click on the sign, and select "New Background Layer", then you should be able to select the Stars image.
0
How to fix the Background problem:
1.Go to Dashbourd
2.Go to Backgrounds
3.Click on the space background.
4.Click on attach to scene.
5.Instantlys goes to level one and puts the background in.
0
The problem with Stencyl and using the crash courses is that they update and change things around so much that the crash course is outdated with each new build. The newest version as of today is completely different than the posted screenshots. Buttons are rearranged or removed completely. I am sticking to it and trying to figure it out as I go along as I will learn better that way but this is not intentional. This is an error that needs attention. Hire an intern or something.
1
On the issue with the ships not appearing in the background:
1.) After the back ground has been added you need to Save Game first.
2.) After that make sure that the layer Star is below the Layer 0.
3.) Voila! If done well you can add Ships and the other Actor Types to your Background.
Good luck and keep at it! Thanks for the Course again. ^_^
1
On Stencyl 3.2, I found the background at the layers, create a new layer with the background :) tk27 is also right, that works too.
2
And then make sure the blank white layer is in screen mode.....
But yes if you follow the tutorial as is with 3.2, you will NOT be able to place Actors on the image.
This section of the tutorial needs re-writing!!
0
@latetriage All you need to do is make sure that your blank white layer is on top of your background layer (Look at the bottom right of your scene window).
2
@OLIVER ALVAREZ They are supposed to stick. It's not a drag and drop, but instead hover over the position you want the actor to be on and left click. It should drop one instantly.
1





