![](img/smiles/tongue.gif)
Forum
![>](img/i_next.png)
![>](img/icons/cc.png)
![>](img/i_next.png)
Some questions about AI vars etc
3 Antworten![Zum Anfang](img/i_first.png)
![Vorherige](img/i_prev.png)
![Nächste](img/i_next.png)
![Zum Anfang](img/i_last.png)
![](img/smiles/tongue.gif)
![cc cmd](img/i_codehelp.png)
![cc cmd](img/i_codehelp.png)
![cc cmd](img/i_codehelp.png)
another 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
![](img/smiles/smile.gif)
@DC:
Thanks for that, my mind is refreshend
![](img/smiles/smile.gif)
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.
![Zum Anfang](img/i_first.png)
![Vorherige](img/i_prev.png)
![Nächste](img/i_next.png)
![Zum Anfang](img/i_last.png)