55,206

Views

Beginner

Level

37

Comments

Abigayl's Interactive Tutorials (Part 4)

by Joe (Updated on 2012-07-21)


Tutorial 4 - Mouse-based Shooting, Collisions, and HP

 

CHANGES TO CURRENT STENCYL VERSION:

  • Game Center is now Dashboard
  • Collisions Groups are now in the Settings button at the top of the page
  • No longer need to make Actor Behaviors; use "Events" tab instead
  • Now need to use “Add an Event” at the top left to make the headings
  • If using events, do not need to "Attach to Actor" (still needed with Behaviors though)
  • Collisions between Actors are now handled by collision events (use "Member of Group" and change the group to "Actors")

 

Liked this one? See them all!

Part 1: The Basics

Part 2: Attributes, Saving/Loading, Kongregate API

Part 3: Advanced Controls, Spawning

Part 4: Mouse-based Shooting, Collisions and HP

Part 5: Music, Screen Boundaries, Backgrounds, Power-ups and More

Part 6: Virtually Lagless Actors

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!

37 Comments

Abigayl
Berga: A sensor is an actor that doesn't LOOK like it collides with any object (although it still does), allowing objects to pass through each other.
0 14 years, 4 months ago
bergapappa
THX Abi, did the trick.
Can't belive I missed this in the tutorial :-)
Could you explain the concept "Is a sensor" in one sentence?

Thx again!

0 14 years, 4 months ago
Abigayl
Berga, in the actor for your bullet, go to the collision detection, then check to say that the bullet is a "sensor". Then, the enemies won't bounce when hit.
0 14 years, 4 months ago
bergapappa
Hi again Abigayl
This one was great also, HP was my favorite. I always seem to make some little misstake though and I may have done it again :-)
My enemies seem to bounce when colliding with the bullet, yours don't.
Any idea?

And thanks again and again for these valuable lessons!

0 14 years, 4 months ago
Abigayl
Chris, it's annoying but I check the tutorials basically every day to see if there is a new post... wish there was some notification system though (hence my sending via PM as well).
0 14 years, 5 months ago
VirusChris
I pick "group for this actor's colliding shape" instead of "group for colliding shape". The names of these snippets are almost identical that I easily mistaken them as one of the other. And I forgot to change increment to decrement as I was being hasty, which isn't good but it's nice to go back and figure out what error you did.

And for the drawing HP bar, I pick the methods in the wrong order. I placed the "Times" snippet onto the "Divie" snippet instead of the other way around, because when I saw it, it looked like you were dividing the multiple numbers.

OK I fixed my problem in less than a couple of numbers after looking this over, but I might make adjustments as my enemies are bigger than ours. Onto the next tutorial! By the way, how do you know when someone post on your tutorials here? Do you check or do you have an e-mail notifying you?

0 14 years, 5 months ago
Abigayl
Chris, double-check that you remembered to do the collision detection on the bullet side (to kill self when hitting the enemy). For the drawing, I don't know why it's not showing up... perhaps the color you are using is the same as the background? I'm on my livestream if you want to chat (since this is just minutes afterwards)... livestream.com/poweredbyflowers
1 14 years, 5 months ago
VirusChris
OK, I've encounter two problems now with this. The shooting works first of all, but when my Bullets hit the enemy that don't disappearing after hitting them and simply bounce off and the second problem is that I don't see any HP bars under the Enemies.

Until I figure out what went wrong, I'll hold off until I figure out the cause of these two errors.

0 14 years, 5 months ago
Abigayl
Chiro, I used Paint.NET, which is just for Windows. I have heard that GIMP is a decent tool though (dunno if it is for Macs), and the Pencyl that comes with StencylWorks is a decent tool too.
0 14 years, 5 months ago
Zkichiro
Abigayl, what´s the program you used to create your sprites, do you know a good one for mac?
0 14 years, 5 months ago

Sign In to Comment