Button event

amitkhemka2amitkhemka2 Member Posts: 5
edited October 2012 in Working with GS (Mac)
Hi folks,

I have a question about adding a button to a scene and attaching an event to it. I want to add a "Jump" button to a scene, on touch event of this button, I want another actor in the scene to jump.

I am able to add a rule to capture touch on the 'button' actor. But don't know how to trigger jump rule on the other actor.
I would really appreciate any help with this.

Comments

  • carlblanchetcarlblanchet Member Posts: 755
    You achieve this using an attribute. In this case you could use a boolean attribute that once the jump button is pressed, change attribute to true, after x amount of seconds change it back to false. Then in the actor that jumps, if attribute is true, make it jump.

    Here's more helpful information on attributes:
    http://cookbook.gamesalad.com/tutorials/2/parts/8

    :)
Sign In or Register to comment.