Skip to content

Commit

Permalink
Update Example - Ai taking cover positions 2.monkey
Browse files Browse the repository at this point in the history
  • Loading branch information
Pakz001 committed Oct 20, 2017
1 parent 74c0af2 commit 873c3b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Example - Ai taking cover positions 2.monkey
Expand Up @@ -478,7 +478,7 @@ Class enemy
'
Method checkrpg:Bool(x:Int,y:Int,direction:String)
' set how many times the ai uses the rpg
If Rnd(50)>3 Then Return False
'If Rnd(50)>3 Then Return False
Local mx:Float,my:Float
Select direction
Case "left";mx=-1;my=0
Expand Down Expand Up @@ -506,7 +506,7 @@ Class enemy
px2+=mx2
py2+=my2
If mymap.mapcollide(px2-5,py2-5,10,10) Then Exit
If distance(myplayer.x,myplayer.y,px2,py2) Then Return True
If distance(myplayer.x,myplayer.y,px2,py2) < 10 Then Return True
Next
Next
Return False
Expand Down

0 comments on commit 873c3b3

Please sign in to comment.