Go to Next Level (help!)

magicpegasus

  • Posts: 101
Hi, I'm new to the scene here and I'm pretty close to publishing my first game. The only problem I seem to be having right now is this:

I need the game to switch to the next scene once a target is killed. I have a tiny target set up in a human ear. It has a health behavior, and once it is hit 10 times, it dies.

I want to be able to go to the next scene when the target dies, but have not been able to figure it out on my. Seems like there would be a simple solution. A big thanks to anyone who can shed some light on this!

thank you,
barry

ps: here's the WIP link...
http://www.stencyl.com/game/play/8235

Alexin

  • *
  • Posts: 3130
Once the target is hit ten times and dies, use the switch block to switch to a different scene. You can find the block in the category Scene > Switching.
"Find the fun"
alexin@stencyl.com

magicpegasus

  • Posts: 101
Where can I find the switch block? I must be missing something obvious here...a stencylforge search isn't turning up anything. Is it just me, or is stynclyforge really slow and buggy?

 i would rather have a simple categorized listing of behaviors than big icons with "featured" items listed first. that probably exists, i just can't find it.

sorry if these are noob questions, but maybe I'm showing how new users could get confused/frustrated with this amazing software.

Thank you! -b

Joe

  • *
  • Posts: 2480
Hi magicpegasus,

The block is inside the Design Mode palette, not on StencylForge. You'll want to modify the Behavior that kills the target to use this block:



Check out the Introduction to Design Mode article inside the Help Center if you're wondering how to modify Behaviors. Good luck! :)

magicpegasus

  • Posts: 101
Thank you so much! I will read that article right away.
-b

magicpegasus

  • Posts: 101
@Joe:
On second look, I realized that I was using this block earlier. I had it attached to my health behavior. The problem was, anytime the target's health dropped to zero, it would always go to the scene I selected, so it only worked for switching from scene one to two, not two to three, or three to four.

I need it to go to "scene2" when the target is killed in scene 1...then go to scene three when it's killed in scene 2, and so on. Do I need to make copies of my health behavior, or is there a way to make "instances" of it?

Joe

  • *
  • Posts: 2480
You can create a separate instance of each Behavior using Actor instance customization. Here's what I would do:
  • In the Health Behavior, create a new Attribute of type Scene called something like "Next Scene".
  • Reference this Attribute when you use the Switch Scene block.
  • Open up the first Scene in the Scene Designer and double-click on the Actor to which the Health Behavior is attached.
  • Set the value of the "Next Scene" Attribute to be the next Scene (Scene 2).
  • Repeat steps three and four for all of the remaining Scenes.
Does this make sense?