201,423

Views

Beginner

Level

25

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!

25 Comments

Chlodgebadger01
i have no settings button with a light switch, how do i otherwise get to settings?
3 5 years, 4 months ago
nazzz
I found: dashboard->game->collision groups->on the right create new
3 5 years, 6 months ago
nazzz
Hey, I still don't know how to access that game settings since I don't have that button up like shown in picture. Can anyone help?
1 5 years, 6 months ago
scubapk01
Game Settings - Groups

Step 15
To start, click the Dashboard tab...
Should be -
Click the Settings button on the top tool bar or via the menu select "View" then "Game Settings"

Step 16
...and then click the Collision Groups button
Should be - Press Group Tab - picture of car on left hand side tab.



2 6 years, 1 month ago
etfonehome
One problem with this. When you tell us to set collision groups, you say to find collision groups, and that it's under game in the dashboard menu. However, in the version I'm using, you had to go up to settings. This was confusing and irritating, and I had to ask somebody in the forums. This might turn away a lot of people.
2 6 years, 3 months ago
superclutz
thanks faustian great help there 0.o again to get to Collision Groups,>>

(You can also get there by clicking the Settings button (it has a picture of a light switch) in the gray area at the top of your Stencyl window, then picking the Groups tab>>

please update this tutorial if your going to update the software automaticly. had me going crazy. :/ :P >:D

1 6 years, 3 months ago
patdi85
faustian Thanks.

Hey Joe (who updated this page last) - May want to check against the current version of Stencyl.

0 6 years, 3 months ago
patsventure
thanx faustian for finding the groups for me to ez
0 6 years, 3 months ago
mello
Thanks a lot faustian!
0 6 years, 3 months ago
Absurde
Damn, it was not easy to find... thanks!

0 6 years, 3 months ago

Sign In to Comment