Flint Particle System Forum - DeathZone Location Bug Sat, 25 Dec 2010 16:19:32 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher DeathZone Location Bug http://flintparticles.org/forum/comments.php?DiscussionID=16&Focus=81#Comment_81 http://flintparticles.org/forum/comments.php?DiscussionID=16&Focus=81#Comment_81 Fri, 11 Apr 2008 21:00:10 +0100 ericr
Moving the Emitter's renderer works as expected.

Tested against the DiscZone object. "new Point( 0, 0 );" as the point value resulted in the DeathZone appearing in the top-left corner of the Renderer object.

Test code:
package
{
import flash.display.Sprite;
import flash.geom.Point;

import org.flintparticles.actions.DeathZone;
import org.flintparticles.actions.Move;
import org.flintparticles.counters.Steady;
import org.flintparticles.displayObjects.Dot;
import org.flintparticles.emitters.Emitter;
import org.flintparticles.initializers.*;
import org.flintparticles.renderers.BitmapRenderer;
import org.flintparticles.zones.*;

[SWF(width='500', height='500', frameRate='61', backgroundColor='#000000')]

public class Test extends Sprite
{
public function Test()
{
var emitter : Emitter = new Emitter( );
var renderer : BitmapRenderer = new BitmapRenderer();
emitter.renderer = renderer;
addChild( renderer );
renderer.x = 50; // To see the offset problem.
emitter.x = 125;
emitter.y = 125;

emitter.counter = new Steady( 25 );
emitter.addInitializer( new SharedImage( new Dot( 3 ) ) );
emitter.addInitializer( new Position( new PointZone( new Point( 0, 0 ) ) ) );
emitter.addInitializer( new Velocity( new DiscZone( new Point( 0, 0 ), 100, 0 ) ) );

// Set the DiscZone to use "new Point( 0, 0 )" to see the issue.
emitter.addAction( new DeathZone( new DiscZone( new Point( emitter.x, emitter.y ), 110, 95 ) ) );
emitter.addAction( new Move( ) );

emitter.start( );
}
}
}

Thoughts? Is that how DeathZones are intended to work? The Initializers respect the emitter.x and emitter.y settings but the DeathZone appears not to... :/ ]]>
DeathZone Location Bug http://flintparticles.org/forum/comments.php?DiscussionID=16&Focus=83#Comment_83 http://flintparticles.org/forum/comments.php?DiscussionID=16&Focus=83#Comment_83 Fri, 11 Apr 2008 23:03:27 +0100 Richard