Hey guys!
Pixel, you're right about the "always" event. I've been using FORs inside functions for a while so I kinda forgot about it
Silver:
Glad you are mixing solutions to come up with what you want!
As for the math, let me try to explain to you:
distance() is a nice system expression the devs created to help us find the distance between objects without having to make a math mess on your event sheet.
clamp() is another expression which gives limits to your output number - in this case, between 0 and 100.
So the event is:
If the distance between Player and Tree is below 200 pixels, run this:
- Set the tree's opacity - with a limit between 0 and 100 - to the value of the distance.
I've multiplied it with 0.7 to make the value more intense - if the tree's distance is 150 pixels, the tree will get 100 opacity clamped from 150), so you wouldn't see a thing.
Do you get it? I don't know if I'm being very clear as I am also not a developer
CHEERS!