Particles? not really sure how to use with destroy.

Good evening!
so i tried playing with particles. i am not successful as i want the particles to appear when it is destroyed. but instead nothing is happening.

i have 1 rule created. 1 that says when actors collide, destroy. Then when actors collide, particles. so the result is only destroyed. thanks for the help guys

Comments

  • VolontaArtsVolontaArts Member Posts: 510
    i think i misunderstood particles. i thought it was to destroy something but its looks like its for shooting???
  • VolontaArtsVolontaArts Member Posts: 510
    i was thinking a slash of particles at every direction
  • quantumsheepquantumsheep Member Posts: 8,188
    One way to do it would be to have a third non-moveable actor called 'explosion'.

    Make a global boolean variable called 'hit'.

    Let's say your two actors are called 'Missile' and 'Spaceship'.

    Constrain the self.X and self.Y variables in the 'Spaceship' actor to new global variables called 'SpaceshipX' and 'SpaceshipY'.

    When the two actors collide, change 'hit' to true. change the self.X and self.Y variables of the 'explosion' actor to 'SpaceshipX' and 'SpaceshipY'

    Your particles will be in the explosion actor. The rule here will be 'When hit = true' then spawn the particles.

    Remember to reset the 'hit' variable to 0 so that it can be flipped on again with a collision.

    Experiment with that and see how you do!

    QS =D
  • VolontaArtsVolontaArts Member Posts: 510
    @quantumsheep thank you. i will try this.
  • VolontaArtsVolontaArts Member Posts: 510
    @quantumsheep how can i make the particles shoot out all directions? would i have to make a couple particle rules aiming different ways?
  • quantumsheepquantumsheep Member Posts: 8,188
    Hey there,

    I'd just experiment lots with the particle behaviour. Just make a new project with one actor in the middle of the screen that creates particles.

    Then experiment with all the particle settings and see what happens!

    It's fun and you'll learn something :)

    Hope that helps,

    QS =D
  • -Timo--Timo- Member Posts: 2,313
    when you put in the direction random(1,360) the particles will shoot in all ways
  • VolontaArtsVolontaArts Member Posts: 510
    @quantumsheep true! thanks
  • VolontaArtsVolontaArts Member Posts: 510
    @timolapre1998 awesome... will do!
  • VolontaArtsVolontaArts Member Posts: 510
    @timolapre1998 @quantumsheep so i took both of your advices! and heres what i came up with!

    oh i used a random downloaded template btw.... i think it was from @socks

  • VolontaArtsVolontaArts Member Posts: 510
    so i created a rule that when its touched, change the alpha color to .9 just as a trigger for the particle can trigger when alpha = .9 and i set the destroy to .2 seconds or .1 i forgot. but that gives time for the particle to show. im happy with it
  • VolontaArtsVolontaArts Member Posts: 510
    thanks again guys
  • quantumsheepquantumsheep Member Posts: 8,188
    No worries! :)
  • natzuurnatzuur Member Posts: 304
    when you put in the direction random(1,360) the particles will shoot in all ways
    I think GS runs from 0-359, but yes essentially that.
  • VolontaArtsVolontaArts Member Posts: 510
    ok ill change it and see if it makes a difference @natzuur thanks
  • -Timo--Timo- Member Posts: 2,313
    when you put in the direction random(1,360) the particles will shoot in all ways
    I think GS runs from 0-359, but yes essentially that.
    0 is the same as 360 so it doesn't matter what you have ^^
Sign In or Register to comment.