dumb question but....
eboy
Member Posts: 239
HOw do I have an actor spawn when a touch is pressed and destroy when touch is released..but have that actor controlled by another actor...
Comments
I have a "bomb controller" actor that listens for mouse down. When it receives that event, AND there isn't also a bomb on the screen already, it spawns a new bomb actor.
The bomb actor listens for the mouse Up event, and when it receives it, it destroys itself.
There is a global attribute called "bomb" that is set to true/false when the bomb is present on the screen. the bomb controller sets it to true, the bomb itself sets it back to false when it get gets destroyed.
Actors can't control another actor directly, you have to do it by using global attributes.