Controlling actors
MattButlerStudios
Member Posts: 486
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
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@
What do you mean by game attribute? Change attribute? @matarua
www.mbstudios.co | Free Stuff
Create a boolean attribute called collide, under the attributes tab, not in the actor.
Need Help? Email Me | Templates | Full Game Source Code
Thanks a lot @matarua and @bjandthekatz for helping me better understand attributes. Have a good one!
www.mbstudios.co | Free Stuff
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