ARGH! AGS hates me. 
Here's my code:
Code: AGS
The second croc won't wander. He just sits there like moat scum... Until I remove the last line: if (GetWalkableAreaAt(x, y) == 2) not_found = false;
As long as that last line is there, his code breaks and I can't, for the life of me, figure out why. I'm not even getting a compile time error.
Heh, btw. Yesterday all my crocs were swimming just fine yesterday with Crimson's code. I started working on my game some more today and they swam right out of the mote. Hrmph. They went right into walkable area 1 from walkable area 2. 2 is the moat 1 is some field space.

Here's my code:
function UpdateCrocodile2()
{
bool not_found = true;
while (not_found) {
if (cCroc2.Moving)
return;
int x = 171 + Random(179);
int y = 14 + Random(274);
if (GetWalkableAreaAt(x, y) == 2) not_found = false;
}
}
The second croc won't wander. He just sits there like moat scum... Until I remove the last line: if (GetWalkableAreaAt(x, y) == 2) not_found = false;
As long as that last line is there, his code breaks and I can't, for the life of me, figure out why. I'm not even getting a compile time error.

Heh, btw. Yesterday all my crocs were swimming just fine yesterday with Crimson's code. I started working on my game some more today and they swam right out of the mote. Hrmph. They went right into walkable area 1 from walkable area 2. 2 is the moat 1 is some field space.