I want: actor can be "pressed" only on 50% of its surface
stefdelec
Member, PRO Posts: 146
Hi,
I created a rule when actor A is pressed=> something. However I want this rule to be true only if players touches the middle of the actor, or around it; not all of it.
Let's assume the actor is 50-50, and I want 25 around the center to be active.
I ve added the rule:
numeric expression: magnitude(self.positionX-mouse.positionX;self.positionY-mouse.positionY)<magnitude (25;25)
It doesn't work. Any reason?
I hope I was clear...
Stéphane.
Comments
Make sure to separate attributes with commas not semi-colons. Also, the right side of the rule condition should just be 25.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Tks it is working perfectly!!