Change actor color based on actor destroyed?
I've created a white score actor that says "+75".
I would like for when a blue block is destroyed for the "+75" to change to the blue color. If a green block is destroyed I want the "+75" to change to a green color.
When a block is destroyed the block Spawns Actor, and the "+75" has a behavior to interpolate to where the score is (nice little feature there for added flare).
Whats the best way to accomplish changing the color of the flying score to the color of the brick without having to create a bunch of different colored actors manually? (I thought about having a game.attribute of game.blockdestroyed, so if blue is destroyed it changes to 1, then on the flying actor if game.blockdestroyed = 1, then change self.red/green/blue to the color that I want. BUT, I have features in the game that blow-up multiple bricks and even multiple colored bricks so this wouldn't work...
Is there anyway to have the spawned actor reference the actor that was immediately destroyed (I don't actually destroy it, I recycle it)...
This is a tough one, hopefully someone has an answer. Thanks!
I would like for when a blue block is destroyed for the "+75" to change to the blue color. If a green block is destroyed I want the "+75" to change to a green color.
When a block is destroyed the block Spawns Actor, and the "+75" has a behavior to interpolate to where the score is (nice little feature there for added flare).
Whats the best way to accomplish changing the color of the flying score to the color of the brick without having to create a bunch of different colored actors manually? (I thought about having a game.attribute of game.blockdestroyed, so if blue is destroyed it changes to 1, then on the flying actor if game.blockdestroyed = 1, then change self.red/green/blue to the color that I want. BUT, I have features in the game that blow-up multiple bricks and even multiple colored bricks so this wouldn't work...
Is there anyway to have the spawned actor reference the actor that was immediately destroyed (I don't actually destroy it, I recycle it)...
This is a tough one, hopefully someone has an answer. Thanks!
Comments
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps