


1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("ms100", "kkk") function kkk() 	-- id=1, a NON-BOT player 	if (ai_freeline(1, 300, 400)) then 		msg("YES") 	end end
Do I have to implement my own player_freeline() here or are there any workarounds? (Setpos´ing a bot for a split second, do ai_freeline check, and then setpos´ing the bot back is possible but not good for the gameplay )


Like:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
botid = 2 parse("setpos 2 32 32) -- Place Bot OUTSIDE OF MAP function isOutside(x,y) 	if (ai_goto(botid, x,y) == 0) then 		return false; 	else 		return true; 	end end
While I always have a bot with pid=2 placed outside of the map. Are there better ways?