Single Event Upon an Object Collision?

davesfarmdavesfarm Member Posts: 14
edited November -1 in Working with GS (Mac)
Hi, I have two objects, a ground and a ball.

I want when the ball hits the ground to spawn some particles, and shake the camera.

I havent even looked into shaking the camera yet heh, but I cant get the particles to only spawn when the initial collision of the two objects happens.

the particles keep spitting out because the objects, i guess after the ball has landed, continue to collide...

I set up a rule that said, when the objects collide to spawn the particles... is this not the right way?

is there a rule that changes something like this to only happen once, or during the initial collision that I am not aware of?

I have a feeling this is something I am totally just noticing because it seems like one would want this behavior quite often...

thanks!

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you should setup an attribute probably a boolean self attribute firstimpact

    then
    When overlap or collide
    and when self.firstimpact is false
    --Do particals
    --Change attribute self.firstimpact to true
  • davesfarmdavesfarm Member Posts: 14
    Hey I'm sorry, but I'm pretty green with GS and I actualy had a question about doing exactly what you suggest before!

    So hopefully you can enlighten me on how do I?:

    --Change attribute self.firstimpact to true

    Thanks for the additional help!

    :)
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Change attribute is a behavior in the list of behaviors. you just drag it over and the expression editor to select your attributes.

    I would recommend watch through tutorials as well as reading through the wiki. there is tons of info and have learned a lot watch tshirtbooths videos

    http://gamesalad.com/forums/topic.php?id=11552

    http://gamesalad.com/wiki/
  • davesfarmdavesfarm Member Posts: 14
    Thanks!
Sign In or Register to comment.