Posted By: Marky Mark
random moving - 08/10/07 18:57
Hey,
I'd like to do a function that choose randomly a angle between 10 and 170 degrees, then move the entity into this way. Here's my plan:
function chooseway()
{
//choose a random direction
}
then in some entities actions that I want to follow the given directions,
action X
{
...
// move at X speed to the direction chosen by chooseway()
}
is this possible? Can someone help me coding my idea?
Thanks a lot !
I'd like to do a function that choose randomly a angle between 10 and 170 degrees, then move the entity into this way. Here's my plan:
function chooseway()
{
//choose a random direction
}
then in some entities actions that I want to follow the given directions,
action X
{
...
// move at X speed to the direction chosen by chooseway()
}
is this possible? Can someone help me coding my idea?
Thanks a lot !