Turkish Coffee
Member
Hey,
as I'm messing with randomized AI coding, I'm in need of an information about "randomize();"
Here, I have a code bracket that does things with choose(n1, n2) and random_range(x1, x2);
So, if I want to have the choose and random_range functions to get a random value every execution of this function, do I only need to have randomize(); in the first created object's Game Start Event or should I have it in the code bracket as its commented above?
as I'm messing with randomized AI coding, I'm in need of an information about "randomize();"
Here, I have a code bracket that does things with choose(n1, n2) and random_range(x1, x2);
Code:
if (state == "wander")
{
//randomize(); <---
if (alarm[1] == -1)
{
alarm_set(1, room_speed*random_range(2,5));
moveDir = choose("right", "left");
}
if sprite_index =! (sMoveRight or sMoveLeft)
{
sprite_index = choose(sMoveRight, sMoveLeft);
}
}