Forum

> > CS2D > Scripts > keep bot his distance from player
Forums overviewCS2D overview Scripts overviewLog in to reply

English keep bot his distance from player

No replies
To the start Previous 1 Next To the start

old keep bot his distance from player

dragon_soldier12
User Off Offline

Quote
Im trying experiment with some scripts and combine them. well succesful. but the problem is the bot is way TOO close from the player.
is there any way to keep his distance away from the player by (lua) adding some lines in or create a new script?. if can please show the script.

this is the script that makes bot follow
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("second","vaimode")
function vaimode()
vai_mode[2]=7
vai_smode[2]=1
end

addhook("always","goaway")
function goaway()
     if vai_mode[2]==7 and vai_smode[2]==1 then
          if player(1,"tilex")==player(2,"tilex") and player(1,"tiley")==player(2,"tiley") then
               vai_mode[2]=0
               vai_smode[2]=0
          end
     end
end
can use this script. its not mine, just picked it up in somewhere.



the people who helps will get a cookie.

sorry for asking way to many questions but. i need it for my mod, based on instense singleplayer and multiplayer mod for cs2d.
edited 1×, last 29.03.13 01:25:39 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview