I request your help : I am writing a AI script, this is the part of the script which handle the follow behaviour of bots and I am having a problem.
the code bellow is working well when the player who host the server is walking but bad when it's someone else, for them bots are "jumping". someone can explain me why it react like that ?
do you guys have ideas to fix that? - have a smouth following bot
here the behaviour with the host:
here the behaviour with someone else (ping 20-40):
here the code : (vai_son[id] is the id of the bot)
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("move","_move") function _move(id,x,y,walk) 	if(not player(id,"bot"))then 		msg("player_x : "..player(id,"tilex")) 		msg("player_y : "..player(id,"tiley")) 		msg("bot_x : "..player(vai_son[id],"tilex")) 		msg("bot_y : "..player(vai_son[id],"tiley"))	 		ai_goto(vai_son[id],player(id,"tilex"),player(id,"tiley"),walk) 	end end
edited 1×, last 21.11.20 12:56:41 pm