Fredrik
Member
Hello!
I'm making a 3D game, so the game doesnt necessarily take place intside the room. Most of the game actually takes place outside the defined room size.
In the enemy's AI they will "idle walk" around when not aggro towards the players. The code looks like this:
This works completly fine, as long as the enemy is inside the room borders. But if it's outside it will always move towards the room borders before it actually start moving in random directions. Why is that? :/
I'm making a 3D game, so the game doesnt necessarily take place intside the room. Most of the game actually takes place outside the defined room size.
In the enemy's AI they will "idle walk" around when not aggro towards the players. The code looks like this:
GML:
// Idle walking.
if stunned = 0
{if enemiewalk = 2
{
idletimer += 1;
if idletimer = 100
{
randomize();
idletimer = 0;
idlex = irandom(360);
idley = irandom(360);
}
mp_potential_step_object(idlex,idley,spd,parent_solid);
}
}