This site requires JavaScript, please enable it in your browser!
Greenfoot back
ThinkingPainter
ThinkingPainter wrote ...

2012/6/24

Best way to add Actor visual effects, after death.

ThinkingPainter ThinkingPainter

2012/6/24

#
Wondering how to make my Actor do a visual effects, when he dies. What would be the best way of achieveing this? Thanks
danpost danpost

2012/6/24

#
That would depend on what kind of visual effect you were looking for. Fading? Shrinking? Expanding and POPping? EXPLODING? Floating to Heaven? Sinking into the ground? (you see where I am going?) Then, what code do you have so far, in that respect?
ThinkingPainter ThinkingPainter

2012/6/24

#
I want it to Explode, but right now it is just disapearing heres the code i currently have public void eat() { Actor blip; blip= getOneObjectAtOffset(0, 0, Blip.class); if (blip != null) { World world; world = getWorld(); world.removeObject(blip); } } what i'm looking for is my actor Blip to explode when he is removed Thanks ThinkingPainter
danpost danpost

2012/6/24

#
What you are looking for is in the 'lunarlanding' sample scenario that comes with Greenfoot.
ThinkingPainter ThinkingPainter

2012/6/25

#
I put the code in, but there is a bunch of errors i am unaware on how to fix. Is there a way i could make a simpler code? It doesn't have to be an explosion, as long as it does something other than disappear, and continue playing... maybe like a "The End" after the main actor is dead and game starts over?
erdelf erdelf

2012/6/25

#
you could make a gif-animation. Greenfoot provides a class to play gif files.
You need to login to post a reply.