ItsMods

Full Version: controling test clients individually
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so i am trying to create a mod that allows the user to place multiple bots in any place on the map. i have made everything work, but when i spawn the second bot both the first and second bot move to the same location. (i want the bots to stay in there own positions)

if (isDefined( player.pers["isBot"] ) && player.pers["isBot"] ) {
player setOrigin( destination );

Is there any way of controlling each bot individually?

thanks for any help Wink
Could create a for loop and then have a local var such as for( i = 0; i < level.player.size; i++ ) { if---- player setOrigin( destination + some xyz modifier )
You can spawn all bots and while you spawn them you get them in an array called level.bots (for example). You could access each of them like:

level.bot[2]
level.bot[5]
...