|
|
Re: AI follow
[Re: KB_Alpha]
#215521
07/11/08 19:46
07/11/08 19:46
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
look at the intense x thread
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: AI follow
[Re: Blade280891]
#215543
07/11/08 22:59
07/11/08 22:59
|
Joined: Apr 2005
Posts: 1,988 Canadian, Eh
DLively
Serious User
|
Serious User
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
|
here is a start...
action follow_player{
my.shadow = on;
while(1){wait(1);
if(vec_dist(my.x, player.x) < 375){//if(player is 375 quants close to me...
my.skill1 = 5 * time;// set to 0 to stop movement
//watching the player
vec_set(temp, player.x);
vec_sub(temp, my.x);
vec_to_angle(my.pan, temp);
my.tilt = 0;//dont tilt me in the players direction...
}
c_move(me, my.skill1, nullvector, glide);
}
}
have fun.
|
|
|
Re: AI follow
[Re: Blade280891]
#215551
07/12/08 00:24
07/12/08 00:24
|
Joined: Apr 2005
Posts: 1,988 Canadian, Eh
DLively
Serious User
|
Serious User
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
|
Here, I tried to post this earlier, but it didnt seem to stay...
action follow_player{
my.shadow = on;
while(1){wait(1);
if(vec_dist(my.x, player.x) < 375){//if(player is 375 quants close to me...
my.skill1 = 5 * time;// set to 0 to stop movement
//watching the player
vec_set(temp, player.x);
vec_sub(temp, my.x);
vec_to_angle(my.pan, temp);
my.tilt = 0;//dont tilt me in the players direction...
}
c_move(me, my.skill1, nullvector, glide);
}
}
Its a start... just add it to your script, attach it to an entity. Hope it helps. Devon.
|
|
|
|