Behaviors don't work to me.

purplelava

  • Posts: 82
Hello,

something's wrong. Most behaviors I download from Forge do nothing on my actors when I test a scene. For example, I did the crash course tutorial and those walking and jumping behaviors worked perfectly. Then, I tried to attach more behaviors on the player actor to test them out, but they don't work at all. For example, I downloaded the Mouse Follow behavior, and attached it to an actor inside the scene, and made sure that behavior was on and configured on that actor. I also deactivated the ther behaviors...the Mouse Follow simply doesn't work, nothing happens and nothing follows the mouse. Only the walking and jumping behaviors of the crash course toolkit work. What am I overlooking? Thank you.

Rob

  • *
  • Posts: 1268
A lot of times after you have downloaded any behaviors, it's good to save and close the game and reopen it. That should take care of it.
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

jbrown2177

  • Posts: 35
I concur, I had the same problem the other day, but when I exited out it seemed to work. Might be a small bug with the program.

Greg

  • *
  • Posts: 1260
This could be a big problem, especially if users start downloading behaviors (even official ones) and they appear not to work.  Closing and reopening a game does fix the issue, but most users will not know about this and may abandon the Behavior altogether. 

Here's a simple repro case I found:

1) Download the Pinball example game from Forge
2) Run the game, hit the ~ and verify that no errors occur
3) Download the official "Always Simulate" behavior from Forge
4) Attach it to the "ball" actor and try running the game again
5) Hit the ~ key and you should see this error:

Code: [Select]
flixel v2.32 [debug]
----------------------------------------------------
Path: ../../sandbox/flash/game/resources/1-0.png
Path: ../../sandbox/flash/game/resources/3-0.png
Path: ../../sandbox/flash/game/resources/5-0.png
Path: ../../sandbox/flash/game/resources/8-0.png
Path: ../../sandbox/flash/game/resources/12-0.png
Path: ../../sandbox/flash/game/resources/14-0.png
Path: ../../sandbox/flash/game/resources/17.png
Path: ../../sandbox/flash/game/resources/16-0.png
Waiting for resources: 2966
Init path: ../../sandbox/flash/game/resources/17.png
Complete path: ../../sandbox/flash/game/resources/17.png
NUMLEFT: 7
Init path: ../../sandbox/flash/game/resources/3-0.png
Complete path: ../../sandbox/flash/game/resources/3-0.png
NUMLEFT: 6
Init path: ../../sandbox/flash/game/resources/5-0.png
Complete path: ../../sandbox/flash/game/resources/5-0.png
NUMLEFT: 5
Init path: ../../sandbox/flash/game/resources/14-0.png
Complete path: ../../sandbox/flash/game/resources/14-0.png
NUMLEFT: 4
Init path: ../../sandbox/flash/game/resources/1-0.png
Complete path: ../../sandbox/flash/game/resources/1-0.png
NUMLEFT: 3
Init path: ../../sandbox/flash/game/resources/12-0.png
Complete path: ../../sandbox/flash/game/resources/12-0.png
NUMLEFT: 2
Init path: ../../sandbox/flash/game/resources/16-0.png
Complete path: ../../sandbox/flash/game/resources/16-0.png
NUMLEFT: 1
Init path: ../../sandbox/flash/game/resources/8-0.png
Complete path: ../../sandbox/flash/game/resources/8-0.png
NUMLEFT: 0
Loading Scene 0
Start Fade In
Loading Scene: -1
Main Stage
Error #1065: Variable Design_10_10_AlwaysSimulate is not defined.
Could not load: scripts.Design_10_10_AlwaysSimulate
Could not initialize Script for Behavior: Always Simulate
FINISHED Entering...

Besides this error, there's no indication to the user that there's anything wrong.  So to someone playing the game, the Behavior just doesn't work.


Darkhog

  • Posts: 1243
My 2 cents: It doesn't need SW to be restarted, just click File->Close Game, then save and then reopen game. There'es no need for restarting SW, just reopen game.

There are no impossible things. There is only lack of skills.
Don't click this if your computer has less than 641 kilobytes of RAM.
Stencyl stencyling stencylish stencylers :D

Greg

  • *
  • Posts: 1260
That's almost just as inconvenient - especially if you have multiple behaviors/resources that you're working on at the moment.  We need to find the root cause and fix it to avoid any kind of restarting like this. 

Imnottelling

  • Posts: 34
Another thing people could do is to download a lot of useful behaviors that they know/hope work, and then restart the game if they don't work. So that way people do not have to restart the game 10 times.
Do you like waffles?
No.
Do you like pancakes?
NO! BE QUIET!!

Rob

  • *
  • Posts: 1268
It's not just an inconvenience thing. It's also setting a bad perception. People download a behavior from forge and attach to actor/scene. Try it and it does not work. Then they would say "stencyl not working" "forge behavior not working" etc.

We also have to think about people who have never used stencyl and trying it first time.
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title

Greg

  • *
  • Posts: 1260
Well hopefully we will have this fixed up before the next release and then we won't have to worry about it anymore.

legojoe

  • Posts: 3
This is also the case for new behaviours I create.

I must admit when I started using SW I thought behaviours I downloaded were broken, until I discovered the "could not load" message in the console. (For those in the UK, pressing the ' key brings up the console).

Greg

  • *
  • Posts: 1260
This should be fixed in the next build.  If you want to test early, follow these steps to download the latest sw.jar:

http://community.stencyl.com/index.php/topic,1131.0.html

Greg

  • *
  • Posts: 1260
Out of curiosity has anyone had a chance to test this yet?  I'd like to get a few confirmations that it's working, as the bug is a pretty big annoyance. 

purplelava

  • Posts: 82
Out of curiosity has anyone had a chance to test this yet?  I'd like to get a few confirmations that it's working, as the bug is a pretty big annoyance. 

I'll be downloading the fix and test it now. Thanks!

GrafSchalke

  • Posts: 10
not helping for me
made a behavior today, which works on other user´s games, but in 90% of all tries not on mine

a text message is supposed to show up after 2 seconds
sometimes it´s already there when the scene is created, sometimes it doesn´t appear at all
and when i change the text content, it stays the old for about 5-10 restarts
ctrl+r, close and reopen game, close stencyl ... nothing really helps

Rob

  • *
  • Posts: 1268
This is a totally different matter from the original post which deals with downloading existing behavior on Forge and have it work right away without the need of closing and reopening the game.

In your case, if I understand correctly, my best guess is to try removing either your actor or scene behavior and reattaching it again. Make sure there are no multiple behaviors with same name in game center. Seems like you are somehow still pointing to another behavior. Another possibility is you may have custom actor behavior.
GOLDEN RULE #1 : SAVE YOUR GAMES FREQUENTLY
IOS/XCODE DEBUGGING
http://www.stencyl.com/help/view/xcode-ios-troubleshoot/
WATCH STENCYLWORKS VIDEO TUTORIAL BY SUNRISEKINGDOM
http://www.youtube.com/watch?v=KDfRfjzr9j4&feature=channel_video_title