#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Click !!!!!!

Posts: 25Member

Ty for coming

I have 2 Actor ill call Ac1 and Ac2 . It place in same position.

so when i click in Ac1 ,,, Ac2 will be action too .

I need action in Ac1 only . How can i do that.

btw. Ac1 and Ac2 also have different action. (action mean Rule in itself)

• Posts: 2,780Member, PRO
• Posts: 1,475Member

I think it will depend on your game , when do you want the touch to trigger on actor 2 ?

if actor 1 will change its position then you can put a rule in actor 2

if overlaps or collides with actor 1
do nothing ( leave it blank)
otherwise if touch is pressed
do something.

So actor 2 will only trigger if its touched and its not overlapped with actor 1

But if they will remain in the same position the whole game , and you want one of them to trigger , you can add a game attribute and change it depending on when you want the actions to trigger. For example
create a game boolean attribute game.XX set it to true

In actor 1
if game.XX is true
if touch is pressed do something

In actor 2
if game.XX is false
if touch is pressed do something

Now depending on when you want to chose which actor , toggle game.XX true or false.

The logic can change depending on your game , you might not even need to do it this way. I can't look into your game so its hard to decide which approach is best , there are many other ways to do it as well, but these are 2 simple ways that might help.

• Posts: 25Member

ill try thank you so much

• Posts: 25Member

@Icebox said:
I think it will depend on your game , when do you want the touch to trigger on actor 2 ?

if actor 1 will change its position then you can put a rule in actor 2

if overlaps or collides with actor 1
do nothing ( leave it blank)
otherwise if touch is pressed
do something.

So actor 2 will only trigger if its touched and its not overlapped with actor 1

But if they will remain in the same position the whole game , and you want one of them to trigger , you can add a game attribute and change it depending on when you want the actions to trigger. For example
create a game boolean attribute game.XX set it to true

In actor 1
if game.XX is true
if touch is pressed do something

In actor 2
if game.XX is false
if touch is pressed do something

Now depending on when you want to chose which actor , toggle game.XX true or false.

The logic can change depending on your game , you might not even need to do it this way. I can't look into your game so its hard to decide which approach is best , there are many other ways to do it as well, but these are 2 simple ways that might help.

It's doesn't work because my Ac1 is on HUD and Ac2 is Background it not overlap another ways ?

• Posts: 1,475Member

I didn't understand, i thought they overlapped cause you said

It place in same position.

so when i click in Ac1 ,,, Ac2 will be action too .

I just tried it in different layers , it works just fine.

But if it doesn't then try another method , look into the video tutorial hopscotch shared , or try doing it with a game attribute

• Posts: 25Member

@Icebox can u gift me some guide template x)

• Posts: 25Member

My HUD always move for the game so i can't use constrain Att to check position and like that
It can't overlap each other

• Posts: 1,475Member

@Maybe i am me said:
@Icebox can u gift me some guide template x)

I can but i don't really understand what you want , you have to explain in details , sorry Maybe someone who understands better can guide you, or show an image with steps of what you want to achieve.