Controlling actors

Say for instance I have 3 actors. Actor 1, Actor 2, and Actor 3. Is it possible to do something, say "destroy" actor 3 by making this happen as a result of Actor 1 colliding with Actor 2? So basically what I am saying is can I set up a rule that says when Actor 1 collides or overlaps with Actor 2 destroy Actor 3. I haven't been able to find such a thing. I wish that I could! Thanks for the help everyone!

Comments

  • mataruamatarua Auckland, New ZealandMember Posts: 854

    Use a game attribute to do this - not a self attribute.

    Game attribute triggered when actor 1 and 2 collide. Actor 3 destroys when game attribute is fired.

    Do you get that?

    Cheers, M@

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    What do you mean by game attribute? Change attribute? @matarua‌

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375

    Create a boolean attribute called collide, under the attributes tab, not in the actor.

    Inside #1, When overlaps or collides with #2, change collide to true
    Inside #3 When attribute Collide is true, destroy
    
  • MattButlerStudiosMattButlerStudios Member Posts: 486

    Thanks a lot @matarua‌ and @bjandthekatz‌ for helping me better understand attributes. Have a good one!

  • mataruamatarua Auckland, New ZealandMember Posts: 854
    edited March 2014

    You will see all attributes create a code string that will be like this...

    game.Collide

    or

    self.PositionX

    game.Collide is an attribute you create in the attribute list in your scene.

    You call it Collide.

    When you call it in a rule it gets called game.Collide

    so all those attributes are game attributes.

    You can also have self attributes which are ones inside the actor.

    Hope this helps :)

    And have you done the Cookbook and checked out the GS videos on YouTube?

    There's heaps of good learning in there too :)

Sign In or Register to comment.