value area around an item

Here is an example using continuous values, but considering constant width.

We have 2 custom shape boundaries surrounding the item - in and out (as you can see the width aproximately the same between all the 2 boundaries, in this case around 500 units):

](filedata/fetch?id=1809253&d=1599541158)

The collisions settings are:

In boundary:

](filedata/fetch?id=1809254&d=1599540487)

Out boundary:

3.jpg](filedata/fetch?id=1809255&d=1599540493)

To get the value (considering an int between 0 and 100), we linetrace from the player to the item’s origin, which will intercept the inner boundary. And with that we determine the distance between the player and the inner boundary. Then we use this distance and the width of the area to determine the value:

](filedata/fetch?id=1809260&d=1599541591)

Result:

](filedata/fetch?id=1809261&d=1599541598)