first you need to work out the distance:
Function distance#(x1, y1, x2, y2)
Local x=Abs(x1-x2)
Local y=Abs(y1-y2)
Return x+y
End Function
then, calcuate a number from zero to one based on distance
particle_alpha#=distance()/maxdistance#
make sure all numbers are floats involved in the calculation
Function distance#(x1, y1, x2, y2)
Local x=Abs(x1-x2)
Local y=Abs(y1-y2)
Return x+y
End Function
then, calcuate a number from zero to one based on distance
particle_alpha#=distance()/maxdistance#
make sure all numbers are floats involved in the calculation