Removed Code //sry I dont need my code being ripped
Problem description:
Ok, theres my code for my monster, as you can see it is supposed to go through and if the person stands 2 tiles away from the monster its supposed to walk towards him. Well the problem is IT DOESNT. I figured out if I put "for(P in oview(2))" where the if P in oview statement is it will walk towards the person. But then the monster attacks, then moves random, then attacks, then moves random.
I need the monster to attack the guy only if hes in view by 2 and walk random only if hes not in view by 2. Any help would be appreciated.
if(oview(2,src))