Several issues related around StencylWorks and Behavours

Username: KevinLetsDesign
Game: Angel_two

Hi there,

I've been developing Flash Games with the business I'm working with in Actionscript 3 for some time now, and we've decided to take a look into Stencyl to see what it can offer us. Whilst the majority of issues we've been able to resolve ourselves, as I'm new to the framework and the way Stencyl works I'm looking for some assistance on the following things - The score pack problem being something that has eaten a lot of my time:

Score pack issues
• Dying using the score pack does not reset the score to what it was at the start of the level, meaning score can go up indefinately assuming you die a lot. I was able to partly resolve this by making the score reset to 0 if you were killed by an enemy, however if you fell into a "pit" the score would not reset, despite it taking you to 0 health. Ideally, I'd like to be able to reset the score to what it was at the start of the current level. (Screenshot 1 shows this setup, die in a pit is also set to Kill self)
• Picking up catapillars or mushrooms (see Angel_two) does not increase the score. They have both Pickup and Collect Coin attached to them, but the score does not increase. They are also flagged on the scene as the collectable items, and the correct sound plays once they're all up. Any ideas for this one?

Objects appearing/disappearing
• Objects on the edge of screen, keep appearing and disappearing, this is distracting. Is it possible to get actors to load similarly to tiles, so half of it can show on the screen, rather than the entire thing appearing/disappearing? (See the trees/lights in Angel_two)

Multiple movement keys
• Many games use the arrow keys and WASD to move, is thisnot possible in Stencyl?

Mochi & Stencyl
• Integrating mochi & stencyl - Whilst this has no doubt been asked before, is it currently possible to do so?

Game file size
• My boss doesn't like our games going over 2mb, he's already annoyed that it's 1mb as a blank canvas. Can we get the size lowered somehow? Angel_two is already at 2mb and only has two levels and a looping 20 second theme to it.

Despite the above issues, Stencyl looks good and we hope to continue using it for the future games that we'll be making. No doubt some of the above will be easily solved.


  • Posts: 17
For the score issues, I would store the current score into an attribute called LevelScore upon entering a level (or using the "When Created..." tab for your actor may work just as well), then go into each behavior and find exactly where the player is killed, then reset the score to the LevelScore amount just before or after death. If you want to make any item increase the score then just reference the score attribute upon picking up said item and increase it by whatever amount you wish.

Changing the movement keys is as simple as going into the game controls and changing those or adding new ones to suit your needs.

I have no idea of Mochi and Stencyl work together and I haven't had any real issues with file size, but I did encounter your problem with flickering actors. The problem only ever happened for me when the game was under extreme lag (2fps) due to a faulty behavior however, it isn't a regular occurence for me. I hope someone can help you out with that one though.


  • *
  • Posts: 1268
Does that answer all of your questions? If not, someone from community team will get back to you with more details.


  • *
  • Posts: 2014
Objects appearing/disappearing

This happens because the actor stops simulating once it leaves the screen. To avoid that, either make the actor always simulate, or (better) use the block to set the offscreen bounds. There's a search bar above the pallet in design mode, use that to find the block. If you set the offscreen bounds to be bigger than your actor, it should avoid your problem.

I believe the team has plans about mochi and other stuff, but I could be wrong. Either way, it's a common enough request/question, so they might do something about it in the future. About the file size, have you tried using some of the behaviors on forge to stream music?
My Stencyl resources are available here:
Cutscenes, RPG Elements, Particles, Map System and many more.


  • *
  • Posts: 17528
The engine overhead is 800 KB, of which 250 KB is from Box2D, 250 is from Flixel and the remaining 300 is from our own code. In other words, unless you pass it through an obfuscator, it's not going to get much smaller than it is.

We'll be adding Mochi support in 1.5.