How to detect if the mouse is in a specific boundary of an actor?
So I'm trying to make it that the 100x100 sized actor can detect a mouse inside only if the mouse is in the 60x100 section of the actor.
How could this be done?
Thanks for your time!
How could this be done?
Thanks for your time!
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Best Answer
-
tenrdrmer Posts: 9,934
and while those positions change the rule will re fire and recheck every time it changes. you have access to every actors x and y position as an attribute in each actor. you have to use the expression editor and place those attributes in the expressions and thats how you calculate based on the changing positions.
In the future please do not be so quick to reject a perfectly legitimate answer because you don't see how it could work. just come back tag the person and ask for more info. They are far more likely to keep helping you when you don't just tell them they are wrong.
Cheers
Answers
For example, if mouse x actor x-30
and the same for mouse y. That would check to make sure it's within a box area of 60x60 in the center of the actor.
Thanks for the extra help!