Fireworks.

Hectate

  • *
  • Posts: 4643
Import the images you want as an actor, then use it's current animation (FlxSprite) to get its BitmapData.
I'll try that tomorrow. That sounds like the best solution for flexibility and enhancement. Thanks.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Jon

  • *
  • Posts: 17524
I would try to get something of this nature working outside of Stencyl just to make sure first before doing anything within Stencyl.

Hectate

  • *
  • Posts: 4643
I would try to get something of this nature working outside of Stencyl just to make sure first before doing anything within Stencyl.
Yeah, I've been building my work on existing code from some pre-Stencyl projects. I wasn't big on FlxEmitters due to their seeming complexity, but I'd gotten a few working via tutorials and other tweaking and experimenting.
Granted, it'd be good to check the changelog for FlxEmitters between 2.32 and 2.35.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Hectate

  • *
  • Posts: 4643
OK, I have an emitter working fine in a Flixel "game" using FlashDevelop. The same code, in Stencyl, will compile with only one minor change required - but nothing will show in the screen (print statements do appear in the console, however).
I suspect that the culprit is how the behavior adds things to the scene. In Flixel, the FlxEmitter is set up, activated and then added to the current FlxState with a simple line of "add(emitter);". This alone doesn't work with SW though, because the BehaviorScript isn't a FlxState - but the scene is. Looking at the API, "scene" is the property that references the FlxState's methods, and while "scene.add(emitter);" doesn't throw out any errors, I don't get a visible emitter. I'm putting the code into the "init" area, which I am assuming corresponds to a FlxState's "create" area.
Any ideas why a functional emitter is either not added to the scene or not visible? Do I need to manually run super.create or super.update?
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Hectate

  • *
  • Posts: 4643
Well, still no luck. I tried using both "scene.add(emitter);" and "wrapper.game.add(emitter);" with no visible results.
Either the particles are being obscured by something (layers? underneath the background?), the "add()" method from GameState/FlxState is broken in SW's version of flixel, or it has something to do with the way SW draws things on the screen not being compatible with how Flixel tries to do it.
I don't have any more time to burn on this, so for now, no fireworks...
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Alexin

  • *
  • Posts: 3127
I may be wrong, but it looks like the engine doesn't update nor renders anything added via FlxState.add(), which would be "scene.add(emitter);".
"Find the fun"
alexin@stencyl.com