Two Actors Controlled By Same set of buttons..Issues

kinzuakinzua Member Posts: 554
edited November -1 in Working with GS (Mac)
Ok..M in a grave situation. I have two actors and 4 buttons(actors) in my scene. I want to control each actor individually, by touching them on/off and using the 4 buttons on the screen.

I am using 'change att' and integer increments to detect on/off of actors.

Issue is.. when i start the scene..the actors work fine..but when i do a multiple set of on/offs, both the actors begin to react to the buttons.

Please help.

Comments

  • POMPOM Member Posts: 2,599
    You should have a game "Integer" attribute called "hero 1 or 2"
    If you want to control hero 1 only, change attribute to 1 and if you want to control hero 2 change the attribute to 2

    Now in your hero actors warp all your rule in a big rule like let's say in hero 1 actor:
    When "hero 1 or 2" = 1
    hero 1 movement rules

    Same goes for hero 2
    When "hero 1 or 2" = 2
    hero 2 movement rules

    Hope it helps.
    Roy.
  • kinzuakinzua Member Posts: 554
    I did something similar..

    like..
    When Hero1 is touched...then
    Hero1 = 1
    'and likewise..

    what's happening is that after its being touched on/off once, Hero1 is turning 1 without being touched...
    should i use 'constraints' instead of 'change att'... or work on a new logic from scratch?
  • kinzuakinzua Member Posts: 554
    ok.. maybe u right

    what m doing is ..
    if hero1 is touched then..
    hero1=1
    else 0
    if hero 2 is touched then ..
    hero2=1
    else 0..

    and then making changes based on whoever is 1..

    probably what u suggesting is that..i shud use another variable to detect who's in action and make changes accordingly?

    am i following u right?
Sign In or Register to comment.