Touch rule triggers even while the actor is covered by another...Help please.
33miles
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!
Comments
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.
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.
Universal Binary Template - Universal Binary Template Instructions Rev 4 (Short) - Custom Score Display Template
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.