constrain ALPHA to MAGNITUDE???
i can assume this is possible 
basically heres my thing:
i want actor1 to be invisible. but the closer it gets to actor 2., the more visible it gets. then if it goes far from actor 2, it goes invisible again. i want it to behave NATURALLY, not as a trigger (or interpolate). i have a work around but it looks more like an alpha interpolation rather than the visibility appearing depending how close i am to actor 2. it hard to explain as text. lol am i making any sense?

basically heres my thing:
i want actor1 to be invisible. but the closer it gets to actor 2., the more visible it gets. then if it goes far from actor 2, it goes invisible again. i want it to behave NATURALLY, not as a trigger (or interpolate). i have a work around but it looks more like an alpha interpolation rather than the visibility appearing depending how close i am to actor 2. it hard to explain as text. lol am i making any sense?
Answers
As an example, if you know that the maximum distance between your actors will be 600 and the minimum will be 0, you could do Constrain Attribute self.color.alpha to (600-magnitude(self.position.x-game.OtherActorX, self.position.y-game.OtherActorY))/600.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User