Actor reaction to another

RZ500RZ500 Member Posts: 2
edited November -1 in Working with GS (Mac)
I´m new in this, and I cannot find a way to make an Actor react to the approach of another Actor?, I have a scrolling background, and I want my actor to enter the area once my Player (Actor 1) enters the area, or get close to it.

Comments

  • RiffelRiffel Member Posts: 1,272
    magnitude

    Usage: magnitude(x,y)

    Find the length of a line segment from the origin, (0,0), to the given point. You can include an offset,(x',y'), to find the length between the two points. i.e. magnitude(x-x',y-y')

    Example: If I wanted to find the length between my actor at coordinates (25,30) and another actor at coordinates (100,240), I would use the expression magnitude(25-100,30-240).

    from
    http://gamesalad.com/wiki/interface_reference:expression_editor
  • RZ500RZ500 Member Posts: 2
    1000 thanks I´ll try that.

    Best regards
Sign In or Register to comment.