dumb question but....

eboyeboy Member Posts: 239
edited November -1 in Working with GS (Mac)
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

  • firemaplegamesfiremaplegames Member Posts: 3,211
    I do something similar in stunt squirrels...
    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.
Sign In or Register to comment.