). I also figured that i could maybe use the "getwatery", which I am currently playing around with now, to stop the players from walking into the water. Forum
Some questions about AI vars etc
Some questions about AI vars etc
3 replies
1

). I also figured that i could maybe use the "getwatery", which I am currently playing around with now, to stop the players from walking into the water.
playertable combined with
getplayerx and
getplayeryanother hint: use collision commands to analyze the terrain.
No i ahve not seen your Zombie Ai, but I'm gonna go check it out now
@DC:
Thanks for that, my mind is refreshend
I used this code to stop the AI from walking into water:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
previouspos = getplayery(0) if ( getplayery(0) == getwatery(0) +32 ) then 	goleft() 	if getplayery(0) < previouspos then 		goright() 	else 		goleft() end
But i guess the collisions woud work better, like just scan the entire terrain, and determin which of the pixels are an obstacle or just air.
1

Offline