Opposite of Magnitude?
![m456arcus](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Ok. I've got a player actor and a depth charge that floats down slowly. Each charge calculates it's distance from the player with the magnitude function; as they get closer the value goes down. The charges also start with a random fuse length before they explode wherever they happen to be.
So, here's my issue. And it might be simple, but I can't figure it out. When the charge explodes, I want the health deducted to be proportional to the distance from the player. How could I efficiently go about doing this when magnitude goes up as distance increases, not down like I want?
So, here's my issue. And it might be simple, but I can't figure it out. When the charge explodes, I want the health deducted to be proportional to the distance from the player. How could I efficiently go about doing this when magnitude goes up as distance increases, not down like I want?
Comments
That will be an inverse function, and as magnitude goes up, health decreased will go down.
At least tomorrow is saturday, and sunday comes afterwards.
Partying, Partying, Yeah!!
Kickin' in the front seat
Sittin' in the back seat
Which seat can I take?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pure poetry.