Help me!

I'm making a rpg for iPhone, but I'm stuck. To interact with things in the world, you're character must touch them and an "interact' button will appear at the bottom of the screen. Now my problem is this: I want that interact button to disappear when I stop touching any item, so that I can only interact when I am in contact with an item/animal/person.
Thank you

Answers

  • jigglybeanjigglybean Member Posts: 1,584

    I guess the best way would be to use a boolean. So if touch is pressed = true. If its not, then Otherwise set it to false as the default.

    Name is something like 'interaction' as a game level attribute. Then in your item/animal/person actors, add an attribute there 'if touch is pressed = true otherwise, change attribute 'interaction' to false.

    Like Balls? Then click here! We've 100 coming soon

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Please use descriptive titles for your threads instead of "Help me!"

    You also posted this in the "Announce Your Game!" subforum. Are you using a Mac or a PC?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • cheech2099cheech2099 Member, PRO Posts: 3

    Set your collide attributes for your actors then create a Boolean attribute and name it something like "interactions". Then you could set a collision rule like when actor1 collides with actor2 change attribute "interactions" to true. You can then set a separate rule for the interactions button to change visible attribute to true when interactions is true

Sign In or Register to comment.