172,456

Views

Beginner

Level

24

Comments

Crash Course 2: Invaders - Part 3

by Hectate (Updated on 2015-01-31)


Part 3: Actor Collisions

Step 15: We’ve got one Actor Type so far, but before we can go further, we need to organize our Actor Types into what are called Collision Groups. The Collision Group an Actor belongs to determines what other Actors it can (and can’t) collide with. To start, we click the Settings button at the top of Stencyl's interface, in the upper left.

Settings button

Step 16: A new dialog will pop up that shows the settings in our game. Different options are down the left side, we want to go to the car icon with the label Groups. The center area of the Game Settings dialog will change to show us our Collision Group settings for this game.

Collision groups settings.

(Note in the screenshot we already created Enemies and Bullets as Groups - we'll show you how to create a Group in the following steps).

Step 17: Click the green Create New button along the top of the window to create a new Collision Group.

Step 18: When the dialog box pops up, name it "Enemies", as shown, and hit the Create button. We can leave the Description field blank.

Step 19: Next, let's click the green Create New button again and create another group. This time let's call it "Bullets".

Step 20: By default, our new groups are not set to collide with anything else. Let's change their settings so they do.

We should have the Bullets group selected in the list to the right (if not, click on it). In the central settings area, we can see the "Bullets" name, the description, and a "Collides With" grid of buttons - one for every other group that we have in our game.

Within the "Bullets" group's settings, click the Enemies button once so it turns green, as shown below. Leave all the other buttons grey. This means any Actor Types that belong to the Bullets Group will only be able to collide with Actor Types in the Enemies Group.

Click the OK button in the bottom-right corner of the Game Settings dialog box to close the window.

Now that we have our Collision Groups set so our Bullets will collide with any Actors that belong to the Enemies Group, it's time to create two new Actor Types, our "Bullets" Actor Type and our "Enemy Ship" Actor Type.

Click here to go to Part 4.

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!

24 Comments

brigzen
Step 20. "Click the OK button in the bottom-right corner of the Game Settings dialog box to close the window".
Versio 2.1.0 No "OK" button. Save the game .

1 2 years, 2 months ago
RoboRanger21
Ok guys, I've fixed my problem. Here is how to solve it if you've had it too. I thought that when I clicked "Create New" in the group settings that Stencyl was freezing. It wasn't. The dialog box that pops up to let you name and give a description to your new group popped up behind the settings window. So I didn't see it. Hope this helps! Thx!
1 2 years, 7 months ago
RoboRanger21
Step 17 is where I'm stuck. I went into settings and into the groups tab. I click Create New and Stencyl freezes every time. It never opens up the tab for me to name my group. I would greatly appreciate help. Thxxxxxx
0 2 years, 7 months ago
kuhneye
This is the kind of explanation, that's outdated, that does not match the current product, that drives people to look into other providers.
0 2 years, 9 months ago
kuhneye
Click the Enemies button in the Bullets group, as shown below. Leave all the other buttons grey.

???????


-1 2 years, 9 months ago
kuhneye
Step 20 makes no sense. I can not see what you are showing, there is nothing similar or obvious.

How am I supposed to set the bullets type as enemies?

0 2 years, 9 months ago
kuhneye
Step 20 does not show either. This is very confusing when the crash ciuse does not show what I'm seeing.
0 2 years, 9 months ago
kuhneye
I've then opened collisions but there is no way that I can see to rename a new group.
0 2 years, 9 months ago
kuhneye
Step 16 makes no sense. I've opened it then what? Going on to step 17 makes no sense either as there is nothing as described.
0 2 years, 9 months ago
Chlodgebadger01
i have no settings button with a light switch, how do i otherwise get to settings?
3 4 years, 3 weeks ago

Sign In to Comment