Space Shooter Error Thread

Ceric

  • *
  • Posts: 610
So I'm not getting a Health Monitor HUD error anymore but I am getting a random error with the Bullet Wave Behavior and Do Periodically.

Edit: I'm testing the new version of Bullet Wave.

« Last Edit: May 05, 2011, 09:32:05 pm by Ceric »

Ceric

  • *
  • Posts: 610
Hey Blackbishop, I tried both of your fixes for Bullet Wave and Do Periodically and I'm still getting that error. Maybe we need another check in there of some kind?

Epic428

  • Posts: 1118
I'll take a look at these issues again tonight and see what I can find. When I tested my fix for the Monitor Health HUD behavior, I did not see it neglecting the player's health but, perhaps, a refresh of it may change that.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Ceric

  • *
  • Posts: 610
For adding Attribute descriptions, are you talking about in Design Mode itself? I can do that, though I'd really like to figure out what the problem with Bullet Wave and Do Periodically are at the moment.

For the Health Monitor HUD, I made another version of the Behavior that seems to be working fine now. I can upload it later.

Can you upload the modified version of Auto Scroll to Forge for me?

Ceric

  • *
  • Posts: 610
Ah, cool. FYI I'm trying out a new version of Bullet Wave. I think the problem is in the messaging between Do Periodically and Bullet Wave. I'm going to add the periodic task directly to Bullet Wave and see if this improves things.

Ceric

  • *
  • Posts: 610
Hey Blackbishop, I overhauled the Bullet Wave Behavior so it doesn't require the extra Do Periodically Behavior to work. I tested it a few times and stopped getting the Bullet Wave Behavior. Do you want me to upload it to Forge for you to test?

Also, I can upload my modified version of Health HUD Monitor, too, for you to check out. I'm not getting errors with that one anymore, at least as far as I can tell.

Edit: I'm adding v2 to each of these Behaviors so you can tell them from the original ones. Once we test these, and find out whether they work or not, I'll incorporate them back into the original kit and rename them with their original names.

Edit 2: Both Behaviors are now on Forge for testing. Let me know how it goes. I haven't run into errors since I tested these but that doesn't mean they're not still there.

« Last Edit: May 07, 2011, 09:44:55 am by Ceric »

Jon

  • *
  • Posts: 17523
Ceric says he'd like these following fixes tested out and verified.

Quote
Hey Jon,

Just an update, I think I fixed the two broken Behaviors in the Space Shooter kit, Health Monitor HUD and Bullet Wave.

After fixing these (at least I think I've fixed them), I'm not so sure it's a good idea to have Do Periodically as its own Behavior in the Action Pack. I kept getting null object errors for the Bullet Wave Behavior. It received a message from the Do Periodically  Behavior and fired shots when it received the message, but I think there was something weird going on because whenever an actor died, there was a chance that the message would be sent right when the actor died, creating the error.

To fix Bullet Wave, I incorporated the periodic task into the Behavior itself.

I feel like I'm missing something about the nature of periodic tasks in the engine here, because technically if you have enough checks (I used Greg S.'s method, the "if not alive, cancel" method), you shouldn't have this issue, but it kept cropping up no matter what I did.

For Health Monitor HUD, that was just a bad old design that I hadn't updated since Matt made a lot of major changes to DM.

-Greg

Ceric

  • *
  • Posts: 610
Note I'm still getting these errors even though I've tried adding a range of checks. The main problem seems to be in the Bullet Wave Behavior.

Ceric

  • *
  • Posts: 610
Note that the error I'm getting doesn't seem to relate to the player actor but rather the bullet actor (it's being created by the Create Recycled Actor block). I added checks for whether Bullet (the bullet actor type) has a value and whether the Last Created Actor is alive, but I'm getting the same error. These checks are in addition to whether the Player Actor is alive, inside both the "do every x" seconds wrapper block and the "repeat every x seconds" wrapper.

Here's the error:

Code: [Select]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at stencyl.api.engine::GameState/getRecycledActorOfType()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1054]
at stencyl.api.engine::Script/createRecycledActor()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/Script.as:930]
at scripts::Design_121_121_BulletWave/whenThisHearsTriggerMessage()[C:\Users\Greg\Documents\StencylWorks\sandbox\flash\scripts\Design_121_121_BulletWave.as:87]
at scripts::Design_121_121_BulletWave/forwardMessage()[C:\Users\Greg\Documents\StencylWorks\sandbox\flash\scripts\Design_121_121_BulletWave.as:111]
at stencyl.api.engine.behavior::BehaviorManager/call()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/behavior/BehaviorManager.as:325]
at stencyl.api.engine.actor::Actor/shout()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/actor/Actor.as:1719]
at Function/<anonymous>()[C:\Users\Greg\Documents\StencylWorks\sandbox\flash\scripts\Design_157_157_DoPeriodically.as:66]
at stencyl.api.engine::TimedTask/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/TimedTask.as:37]
at stencyl.api.engine::GameState/innerUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1365]
at stencyl.api.engine::GameState/postUpdate()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1299]
at stencyl.api.engine::GameState/update()[/Users/jon/Desktop/stencyl/plaf/flash/root/stencyl/api/engine/GameState.as:1281]
at org.flixel::FlxGame/update()[/Users/jon/Desktop/stencyl/plaf/flash/flixel/org/flixel/FlxGame.as:354]

« Last Edit: May 07, 2011, 11:45:02 am by Ceric »

Ceric

  • *
  • Posts: 610
I think I fixed it but my fix impacts game performance a bit. I originally had an "actor is on screen" block in there, which made the game smoother, but since I removed it, I haven't run into the error with the Bullet Wave v2 Behavior so far.

Ceric

  • *
  • Posts: 610
Okay, now I'm getting the same kind of error in Do On Key Press.

I didn't make that one or Do Periodically - those are both from the Action Pack. Since they are giving errors, they should be modified to have checks in them so these null object errors don't crop up.

Edit: Fixed Do On Key Press. I'll try fixing Do Periodically in the same way.

« Last Edit: May 07, 2011, 12:37:13 pm by Ceric »

Ceric

  • *
  • Posts: 610
You need to test the following:

Health Monitor HUD v2
Bullet Wave v2 (you don't need Do Periodically for that one anymore)
Do On Key Press v2

All three are on Forge under "newest."

Greg

  • *
  • Posts: 1260
Hey guys, is this kit ready for prime time?  We're looking at bundling the main kits up to have them ready for inclusion in the next version.  If this is all set, can you please upload the latest copy to Forge?

Ceric

  • *
  • Posts: 610
I think between the two of us it should be fine. I haven't gotten any errors after I changed those two Behaviors and it seems Blackbishop fixed those last couple of things. The only thing left, IMO, would be to rename the Behaviors with "v2" appended to their names to just the name with v2. The only reason I labeled them that way was to distinguish them from the original ones for testing purposes.

Joe

  • *
  • Posts: 2480
Ah, I still never reproduced those errors. :/ Did you get this taken care of, it sounds like?