How to use bots in your title packs
Moderator: NADEO
Re: How to use bots in your title packs
So....steeffeen wrote: another question though:works but fails always on my endCode: Select all
Users_CreateFake(Text, Integer);
the fake players gets created successfully and is working, but the script crashes instantly with the following error
http://www.pictures.esc-clan.net/upload/createfake.jpg
and a request:
it would be great if fake players wouldn't be part of the Players array but included in the BotPlayers array
I checked:
* there's a bug in the error check Users_CreateFake(), doh... so the function completes successfully but still send an error... (fixed in next update)
* the parameter of Users_CreateFake() is a nickname, the login is internally generated.
Actually If you want to create BotPlayers , you should use :
Code: Select all
CreateBotPlayer(NullId, 0, 200, Spawn, 0)
Users_xxx() are inteded to mimic the connection of actual users for the ease of debbuging (like filling score tables & such), so that's why they're not added to the botplayers.
(and maybe at some point in the future also move and shoot around as fake adversaries with scores and all)
Re: How to use bots in your title packs
My bad, should be in the next update. It only means that for the moment the bot wanders around its spawn point, this variable will allow you to make it wander in another zone.steeffeen wrote:Saunter_AnchorPoint doesn't exist
For the Users_CreateFake problem, you can also use this :
Code: Select all
Users_SetNbFakeUsers(Integer _NbClan1, Integer _NbClan2)
Re: How to use bots in your title packs
thanks for your responses 
yeah i had already managed to get bots working quite well actually
they are rocking the scores, i have to play very seriously if i don't want to lose against my bots
(see InstaDM)
thanks for this feature!

yeah i had already managed to get bots working quite well actually
they are rocking the scores, i have to play very seriously if i don't want to lose against my bots

thanks for this feature!

Re: How to use bots in your title packs
Well done, for the findings and the fixing
steeffeen, you're becoming script-bug hunter #1

steeffeen, you're becoming script-bug hunter #1

Re: How to use bots in your title packs
actually i'm fine with that by now, it was just weird at the beginningxbx wrote:Users_xxx() are inteded to mimic the connection of actual users for the ease of debbuging (like filling score tables & such), so that's why they're not added to the botplayers.
(and maybe at some point in the future also move and shoot around as fake adversaries with scores and all)
other things:
1. if you set a number of fake players with Users_SetNbFakePlayers() and restart the script the fake users stay, their number isn't defaulted back to 0, is that intended?
2. after you've set a number of fake players and create one with Users_CreateFake(), is one of the other fake players supposed to be replaced? how do these methods work together? it's quite a puzzle
3. if you try to destroy a fake player with Users_DestroyFake() it says "can't destroy fake" or something like that, is that because the fake user that you want to destroy has to be created by the Users_CreateFake() method or is that a bug?
regards
Re: How to use bots in your title packs
I don't understand. If you restart the script, the fake players are unspawned, then when the script restarts Users_SetNbFakeUsers() is called again (unless you commented/deleted the line where it was called), so fake players are spawned again... Where is the problem ? Do you mean that you spawned fake players with Users_SetNbFakeUsers(), then deleted the call to this function in your script, restarted, and the fake players were not unspawned ?steeffeen wrote:1. if you set a number of fake players with Users_SetNbFakePlayers() and restart the script the fake users stay, their number isn't defaulted back to 0, is that intended?
Users_SetNbFakeUsers(X, Y) makes sure there are X fake players in one clan and Y in the other, destroying fake players if there are more than this number, creating them if there aren't enough. Users_CreateFake() just creates a bot, no matter what. So, if you call Users_CreateFake() before Users_SetNbFakeUsers() there might be some conflicts (calling it after should do what it is meant to, though I don't see the point in using these functions together).steeffeen wrote:2. after you've set a number of fake players and create one with Users_CreateFake(), is one of the other fake players supposed to be replaced? how do these methods work together? it's quite a puzzle
Re: How to use bots in your title packs
yes. (in the sense that it mimics a real user: when you restart the script, the people aren't juste kicked away from the server... )steeffeen wrote: 1. if you set a number of fake players with Users_SetNbFakePlayers() and restart the script the fake users stay, their number isn't defaulted back to 0, is that intended?
Users_SetNbFakeUsers() is just a helper / convience function that just calls Users_DestroyFake()/ Users_CreateFake()steeffeen wrote: 2. after you've set a number of fake players and create one with Users_CreateFake(), is one of the other fake players supposed to be replaced? how do these methods work together? it's quite a puzzle
mmm not quite sure here.steeffeen wrote: 3. if you try to destroy a fake player with Users_DestroyFake() it says "can't destroy fake" or something like that, is that because the fake user that you want to destroy has to be created by the Users_CreateFake() method or is that a bug?
I guess you're talking of DestroyBotPlayer() ?
so yeah Users_DestroyFake() can only be called for players from Users_CreateFake() (and Users_SetNbFakeUsers() )
and DestroyBotPlayer() only for CreateBotPlayer(), you cannot cross them.
symmetry!

Re: How to use bots in your title packs
let's see...

i won't use them together knowing that but with this information you could think that the "overall" number of fake users is 0 if you don't set it with Users_SetNb... and your fake user create with CreateFake() will be destroyed instantly
example:
- Users_SetNbFakeUsers(3, 0);
- 3 fake users on the server
- Users_SetNbFakeUsers(2, 0);
- 2 fake users on the server and the third one is still in the scores and in the user list (disconnected status)
- now i want to get rid of the disconnected fake user, i tried DestroyFake() him but it doesn't work, i will post a screenshot later
- i was able to get him out of the scoreboard by Reset()ing his score but that way it's not 100% clean
maybe you can't really destroy a user object and the method will only "disconnect" the user? it's just that i expected that the whole user object will be destroyed and removed out of the Users list.. oh well that's probably the point.. after you've said that Users_SetNbFakePlayers() calls CreateFake() and DestroyFake() and these fake users aren't removed out of the Users list
i see, i see, fake users are only there to simulate a normal (player) user and i'm just abusing them for my needs
//Edit: okay i couldn't reproduce the issue with DestroyFake(), i will post about that as soon as it happens again
yep, after deleting the function call the bots are still "on the server"Kak0 wrote:Where is the problem ? Do you mean that you spawned fake players with Users_SetNbFakeUsers(), then deleted the call to this function in your script, restarted, and the fake players were not unspawned ?
alrighty!xbx wrote:yes. (in the sense that it mimics a real user: when you restart the script, the people aren't juste kicked away from the server... )

Kak0 wrote:Users_SetNbFakeUsers(X, Y) makes sure there are X fake players in one clan and Y in the other, destroying fake players if there are more than this number, creating them if there aren't enough. Users_CreateFake() just creates a bot, no matter what. So, if you call Users_CreateFake() before Users_SetNbFakeUsers() there might be some conflicts (calling it after should do what it is meant to, though I don't see the point in using these functions together)
yeah that's what i expected, i just wanted to clarify this because i couldn't test it yet (Users_CreateFake() is bugged as you know^^)xbx wrote:Users_SetNbFakeUsers() is just a helper / convience function that just calls Users_DestroyFake()/ Users_CreateFake()
i won't use them together knowing that but with this information you could think that the "overall" number of fake users is 0 if you don't set it with Users_SetNb... and your fake user create with CreateFake() will be destroyed instantly

i didn't talk about bot players, everything was concerning fake usersxbx wrote:mmm not quite sure here.
I guess you're talking of DestroyBotPlayer() ?
so yeah Users_DestroyFake() can only be called for players from Users_CreateFake() (and Users_SetNbFakeUsers() )
and DestroyBotPlayer() only for CreateBotPlayer(), you cannot cross them.
symmetry!
example:
- Users_SetNbFakeUsers(3, 0);
- 3 fake users on the server
- Users_SetNbFakeUsers(2, 0);
- 2 fake users on the server and the third one is still in the scores and in the user list (disconnected status)
- now i want to get rid of the disconnected fake user, i tried DestroyFake() him but it doesn't work, i will post a screenshot later
- i was able to get him out of the scoreboard by Reset()ing his score but that way it's not 100% clean
maybe you can't really destroy a user object and the method will only "disconnect" the user? it's just that i expected that the whole user object will be destroyed and removed out of the Users list.. oh well that's probably the point.. after you've said that Users_SetNbFakePlayers() calls CreateFake() and DestroyFake() and these fake users aren't removed out of the Users list

i see, i see, fake users are only there to simulate a normal (player) user and i'm just abusing them for my needs

//Edit: okay i couldn't reproduce the issue with DestroyFake(), i will post about that as soon as it happens again
Re: How to use bots in your title packs
Latest patch (a few minutes ago) messed bots up. They go idle after setting their mode from Turret back to Patrol. If I set it to Turret after Patrol again it'll act like a turret as expected, but it won't resume it's Patrol behaviour.
The initial Patrol at spawn does work correctly, tho.
The initial Patrol at spawn does work correctly, tho.
=3
Who is online
Users browsing this forum: No registered users and 1 guest