Touch rule triggers even while the actor is covered by another...Help please.

33miles33miles Member, BASIC Posts: 71

Hi guys! I am having an odd problem that maybe you can help me with. I have a star actor behind a rock actor with a rule that says when star -touch is pressed- = -Change attribute, star1collected to true- I used this boolean attribute to trigger an animation when the star is touched. But the thing is, I only want to be able to have this touch trigger activate when I move the rock out of infront of it. I put the star on a layer behind the rock so the rock is truly infront. Yet when I touch that rock actor to move it away in-preview the star animation triggers like the star had been touched! I really don't know what to do with this... Does anyone have any helpful tips? Any help would be greatly appreciated, thanks! :smile:

Comments

  • ookami007ookami007 Member Posts: 581

    I don't know any way to prevent this since technically, no matter what layer it's own, the actor still receives the touch event.

    I ran into this problem with Gage's Dino Preserve, where the dinosaurs were overlapping.

  • colandercolander Member Posts: 1,610

    You can make a switch which can be used to switch rules on and off in an actor when it overlaps with another actor. I have attached a project to demo it.

  • 33miles33miles Member, BASIC Posts: 71

    Thanks for your replies ookami007 and colander! And I am very grateful to you colander for posting the demo that solved my problem! YAY! Thanks so so much, I really appreciate the help and it's nice to know there are such brainy people like you! Have a great night. :smiley:

Sign In or Register to comment.