Guest User

Untitled

a guest
Jun 20th, 2018
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function DeFog(xvalue:Int , yvalue:Int)
  2.     Local radius:Int = 3, dist:Int = 0
  3.     For Local y:Int = -(radius+2) To (radius+2)
  4.         For Local x:Int = -(radius+2) To (radius+2)
  5.             dist=Sqr( (xvalue-xvalue+x)^2 + (yvalue-yvalue+y)^2 ) - 0.25
  6.             If dist < 0 Then dist = 0
  7.             If dist < radius And LineOfSight(xvalue,yvalue,xvalue+x,yvalue+y) = True
  8.                 For Local xx:Int = -1 To 1
  9.                     For Local yy:Int = -1 To 1
  10.                         If CheckWorld(x+xvalue,y+yvalue) = False
  11.                         '   If fow[xx+xvalue + x,yy+yvalue + y] = 0 Then MakeThing(effect_defog,xx+xvalue + x , yy+yvalue + y)
  12.                             fow[xvalue + x ,yvalue + y] = 1
  13.                         Else
  14.                             If fow[xvalue + x,yvalue + y] = 0 Then MakeThing(effect_defog,xvalue + x , yvalue + y)
  15.                             fow[xvalue + x ,yvalue + y] = 1
  16.                         EndIf
  17.                        
  18.                     Next
  19.                 Next
  20.             EndIf
  21.         Next
  22.     Next
  23. End Function
Add Comment
Please, Sign In to add comment