Reference for Stencyl 2.2 Users

Innes

  • *
  • Posts: 1960
The attached PDF document is a step-by-step guide for Stencyl 2.2 Users, so you can follow all the game-development tutorials in the book.

All the tutorials from Chapter 2 through to Chapter 9 are covered, and all of the book's StencylForge assets are now available for Stencyl 2.2 users.

Chapter 10 is not covered, because the mobile development features in Stencyl 3.0 are substantially different.

Please let me know if you have any questions, comments, or if you spot any errors in the document.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

loiirt

  • *
  • Posts: 7
Hi Innes!

Thanks for the Book... It's great!  :)

The 'step-by-step guide for Stencyl 2.2 Users is very useful, but I can't find the 'Stencyl Book tilesets v2_2' or 'Enable Bug Drawing' assets in StencylForce?  :(




Innes

  • *
  • Posts: 1960
Thanks for the feedback and thank you very much for buying the book.


I'll check online; I may have missed something. Please allow me a few hours to check, as I am not near a PC at the moment.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

Innes

  • *
  • Posts: 1960
Hi loiirt,

Apologies for the delay in getting back to you.

I have checked StencylForge using Stencyl 2.2, and both the resources you have mentioned are definitely there and have been downloaded by other Stencyl users, so I'm not sure why you can't see them.


Just in case you still can't see them, I have attached them to this message. Download the attached files and then, instead of trying to download them from StencylForge, select
File | Import Resource ... on the Stencyl menu. You can then select the resource file that you need, and it will appear in Stencyl exactly as though you had downloaded it from StencylForge.

Note that, although both files appear to be PNG image files, they contain all the information that is required to make them work as resources in Stencyl.

Let me know if you need further assistance.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

loiirt

  • *
  • Posts: 7
Hi Innes!

Thank you very much. I still can't see them in StencylForge. I have even tried to reinstall Stencyl with the same result. Maybe I'm the only Stencyl 2_2 user who can not see these files in StencylForge? Who knows ...  :o

Thanks very much for your help. I appreciate that  ;)

Loiirt

Innes

  • *
  • Posts: 1960
I'll ask on the main forum to see if anyone else is having trouble accessing those resources.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

SpecialRetard

  • Posts: 6
Hey Innes

First off a big thank you for your hard work and making it possible for me to dive into Stencyl so quickly and learn so much. I am now in chapter 7 and I cannot find the Success Banner in Stencyl Forge. I need to add that I am using Stencyl 2.2.
Is there a possibility that you could upload it here so that I can finish it off?
Furthermore I realised that when I implement the pause feature, only the monkey is paused. So the statues are still being dropped and the time bar is still reducing. It might be that this issue will be covered in a later chapter but as I am writing this post anyways I decided to just put it in here :)

Made the needed changes thanks to your pdf file ;) should have read it first hehe
Thanks for your help and work.

« Last Edit: October 17, 2013, 06:13:52 am by SpecialRetard »

rickold

  • Posts: 2
Innes,  First and foremost, this is an excellent learning tool.  I commend you for your teaching skills.

As a 2.2 user, I'm getting compile and/or execution errors when running either my version or the downloaded ones at several points in the development.  As an example, running 5961_06_01, I get the following  message at the end of the fade out of the collectibles.  Is there anything I can modify to eliminate these issues? I'm running in Win 7.

Thanks,Rick

TypeError: Error #1009: Cannot access a property or method of a null object reference.
   at stencyl.api.engine.actor::Actor/die()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/actor/Actor.as:2615]
   at Function/<anonymous>()[C:\Users\Owner\AppData\Roaming\Stencyl\stencylworks\preview\scripts\Design_14_14_CollectFruit.as:42]
   at stencyl.api.engine::TimedTask/update()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/TimedTask.as:46]
   at stencyl.api.engine::GameState/innerUpdate()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/GameState.as:1661]
   at stencyl.api.engine::GameState/postUpdate()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/GameState.as:1511]
   at stencyl.api.engine::GameState/update()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/root/stencyl/api/engine/GameState.as:1493]
   at org.flixel::FlxGame/update()[/home/stencyl/stencyl.net/jenkins/jobs/StencylWorks-Dist/workspace/plaf/flash/flixel/org/flixel/FlxGame.as:407]

Innes

  • *
  • Posts: 1960
Hi, and thanks for buying the book; I appreciate your kind comments.

I haven't come across this error before in the downloads, but I'll certainly try to help you resolve the problem.

I don't have access to a PC with Stencyl on it today, but I will have a stab at guessing what the problem is...

The #1009 error occurs when a  non-existent  actor is being referenced (i.e. the "null object reference" mentioned in the first line of the error). I am going to guess that it is a timing problem related to the killing of the actor...

The fruit fades out, and after a second, it is killed. If it is killed before the fade has completed, the fade process that is still being carried out will cause the #1009 error, because the fruit doesn't exist any more.


First of all, try to find the exact location when the error occurs by disabling (right click the block, select disable) the [kill] block that seems to be causing the problem - in this case, it would seem to be the [kill] the block that is timed to occur after the fruit has faded in the Collect Fruit behavior.

If that  prevents the error from occurring, you have found the problem. Next up; solving the problem (not just 'working around it')...

Re-enable the block (right click, enable). You then have a couple of choices: 1) speed up the fade so it is guaranteed to complete before the [kill] block action occurs. 2) Extend the timed delay for actioning the [kill] block.

I'd be tempted to try (2) first - perhaps increase the [kill] delay to something silly like 3 seconds, just to see if it works. If that fixes the problem, you can then work on fine tuning the timing. You may want to speed up the fade, or just reduce the [kill] delay to something like 0.25 second longer than the original setting. Have a play and see what works for you.

I hope that makes sense, and solves the problem for you. If not, export a copy of the game that displays the error (File | Export Game) and upload the file here, so I can have a look. The exported file will have a .stencyl extension.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

rickold

  • Posts: 2
Innes,

I extended the kill delay and shortened the fade and I still get the error at whatever time the kill delay is set for. I've attached the export as requested. (I saw similar problems early on when I killed the monkey)

Thanks again, Rick

Innes

  • *
  • Posts: 1960
I'll certainly have a look at it for you.


Unfortunately, I am away from a Stencyl PC for a few days, so I apologise for the inevitable delay. My first opportunity to look at this will be late Wednesday this coming week.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

loiirt

  • *
  • Posts: 7
Hello Innes!

Had the exact same problem as Rick. I solved it by inserting an "IF statement". Do not know if it's the right way to do it? What do you think of my solution?

Please see the attached file.

Loiirt


Innes

  • *
  • Posts: 1960
There are usually several 'right ways' of solving problems in programming! Yours is a perfectly good solution, and one that I have used in the past. Well done for solving the problem on your own.
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

blacksnowgames

  • Posts: 85
Hello Innes:

I bought your book 3 days ago, I had the same problem than Rickold, also in "Listen the countdown to reach zero" page 123 the same error again. Like you I thought that was a sync problem, but everything looks ok to me. I have programming experience and your logic looks good to me I don't know why this happend. Im using Stencyl 2.2(b502) on Win 7. Flash Player 10. I hope You can help us to fix this issue.

TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
   at stencyl.api.engine.actor::Actor/die()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/actor/Actor.as:2615]
   at Function/<anonymous>()[C:\Users\Carlos\AppData\Roaming\Stencyl\stencylworks\preview\scripts\Design_16_16_Health.as:42]
   at stencyl.api.engine::TimedTask/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/TimedTask.as:46]
   at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1661]
   at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1511]
   at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1493]
   at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:407]

blacksnowgames

  • Posts: 85
Innes:

I fix the problem of page 123 adding a if self is alive then kill self. I thought when an object is killed all the behaviours stops but apparently this "health behaviour" continues and obviously it try to invoke self which is inactive and that generate error 1009.

I wanto to ask you something, on page 114 (Go hero section) the challenge is to fade collectible object and then kill, See attached picture "Collide with collectibles event.png", I got error 1009, is the kill command incorrect?