Particles For Death

11clock11clock Member Posts: 450
edited November -1 in Working with GS (Mac)
In my game, I want it so when you kill an enemy it releases particles upon death for a nice death effect. The problem is that as soon as it dies, the particles vanish because the actor is no longer there. I've tried to make it so the actor makes an invisible actor that creates the particles, but making the actor invisible also makes the particles invisible. Is there a way to use particles upon destroying an actor?

Comments

  • SkyMapleSkyMaple Member Posts: 817
    Easy, just spawn an actor that releases particles. As for the image, just use a blank/transparent one made in photoshop.

    _______________________________________

    Game making service- http://gamesalad.com/forums/topic.php?id=21739
    Sketch to vector service- http://gamesalad.com/forums/topic.php?id=21820
    "Power Orb" Style template- http://gamesalad.com/forums/topic.php?id=22179
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you dont need to use a transparent image to make a actor invisible. Just set the alpha to zero or uncheck visible under its graphics attribute
  • 11clock11clock Member Posts: 450
    I already stated that turning the image invisible also makes the particles invisible.
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Re-read the advice being given ...

    When player dies, just before destroying, spawn blank actor
    Blank actor is set to be invisible
    Blank actor has a particle behaviour to do what you want
    Destroy blank actor when done

    Note that a lot of spawn and destroy can affect the performance of your game
  • 11clock11clock Member Posts: 450
    You just stated exactly what I did. I'll say it again: DOES NOT WORK. YOU CAN'T SEE THE PARTICLES BECAUSE OF REASON STATED ABOVE. I TESTED IT BY MAKING THE PARTICLE ACTOR VISIBLE, AND I WAS ABLE TO SEE THE PARTICLES ALONG WITH A BIG UGLY BOX.

    I am now trying to see if using an invisible image will work.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    Don't uncheck visible. Just under color set alpha to 0.
  • 11clock11clock Member Posts: 450
    Got it to work. Thanks!

    Only I have a new problem. It's supposed to be a short burst of particles, but it seems to make only 4 of the 8 particles at the start and then it continually spams particles a second later. Not sure what's causing it.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    The particle number is the number of particles on screen at any given time. See the box that says "End time" (or something like that)? Change that to something short.
  • 11clock11clock Member Posts: 450
    I don't see anything related to it ending. I see Number of Particles, Particle Startup Time (no idea what this does), and Particle Lifetime. None of these seem to end the particle spamming.

    How am I supposed to set this up to create a short burst of particles?

    I apologize to all of the questions. I am fairly new to GS, though I have Drag & Drop game making experience.

    EDIT: Something like this is what I'm trying to do:
  • AsymptoteellAsymptoteell Member Posts: 1,362
    try a timer.
    Make it say for 1 (or whatever) seconds, Particles.
  • 11clock11clock Member Posts: 450
    Just tried that. I have it set to shoot the particles in a random direction at a random speed for 1 second. It shoots a big pile of particles one direction and starts shooting particles randomly very briefly (not what it's supposed to do).
  • AsymptoteellAsymptoteell Member Posts: 1,362
    You could make the particle actor destroy after a certain amount of time.
  • 11clock11clock Member Posts: 450
    Already tried that, and that's just even worse. I think this issue has to do with me having my first take on particles. I really have no idea what I'm doing. :P
  • AsymptoteellAsymptoteell Member Posts: 1,362
    What happened when you tried to destroy it after awhile?
  • 11clock11clock Member Posts: 450
    Same exact thing as using a timer, except that all of the particles vanish at once. I'll try to be more detailed on what I have set.

    Objective: Make a short burst, like the bursts in the video above when the ball hits the bricks.

    Current Settings:

    Number of Particles: 8
    Particle Startup Time: 0
    Particle Lifetime: 1

    Direction: random(0,359)
    Speed: random(150,300)

    Current Effect: Several particles fly off in one direction at the start of the explosion, then particles suddenly fly everywhere until the actor is destroyed.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    hold on. I'm going to work on it in GS. I'll get back to you once I figure it out.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    put the particle in a timer that says for 2 seconds. That should make it work.
  • 11clock11clock Member Posts: 450
    It still acts weird. It shoots a bunch of particles in one direction, then it creates the delayed burst. I want it to create 8 particles simultaneously, each one shooting off in a random direction at a random speed.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    go into velocity, and set direction to random(0,360) and set speed to random (lowest speed,highestspeed)
  • 11clock11clock Member Posts: 450
    "Direction: random(0,359)
    Speed: random(150,300)"

    The funny thing is that it used to work properly before I implemented the transparent image.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    i made a demo for you

    http://www.mediafire.com/?xk68drveibkm99v

    touch the actor to start the particles, let me know if thats not what your trying to do
  • AsymptoteellAsymptoteell Member Posts: 1,362
    don't use a transparent image. Just change the alpha to 0.
  • 11clock11clock Member Posts: 450
    That's exactly what I want the explosion to look like!

    I'll go ahead and look at what you did.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    glad it helped
  • 11clock11clock Member Posts: 450
    I was able to get it working correctly. Thanks for the help!
  • quantumsheepquantumsheep Member Posts: 8,188
    @John

    Thanks dude - that helped me out a bit as well :D

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    anytime guys glad it helped ! :D
  • icanmakeicanmake Member Posts: 466
    just animate upon death and set a timer for destroy actor
Sign In or Register to comment.