I want: actor can be "pressed" only on 50% of its surface

stefdelecstefdelec Member, PRO Posts: 146
edited April 2015 in Working with GS (Mac)

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Make sure to separate attributes with commas not semi-colons. Also, the right side of the rule condition should just be 25.

  • stefdelecstefdelec Member, PRO Posts: 146
    edited April 2015

    Tks it is working perfectly!!

Sign In or Register to comment.