Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [22:26] <arkore> ok, so i got it working so a bot joins when i join, and bot leaves(using ConsoleCommand("removebots")) when i go spectator(DISCONNECT). but, that's all i can do; that's not a real DISCONNECT. i would prefer a way to execute "removebots" when I actually disconnect from the server.
- [22:32] <@TheMasterCat> do a check to see if there are 0 players
- [22:50] <arkore> its not working. this is the code i have (and i know this code works): http://pastebin.com/PPNBLhLr it works when i goto spectator(which is what Zandronum considers "DISCONNECT") but doesnt work when i actually disconnect from the server.
- [22:51] <arkore> ingame == 1 means 1 player is entered and running around the map. so, according to that code, the bot always is removed when i either go spectator, and should also work when i disconnect from the server(but doesn't work)
- [23:13] <arkore> in fact, if i remove all that code and just put: script 6 (int player) DISCONNECT { ConsoleCommand("removebots"); } --- it still doesn't work when i disconnect from the server. the bot is still there.
- [23:19] * Qent is tired, but remembers that bots don't fight when all the players are gone... maybe it has something to do with that?
- [23:20] <Qent> "gone" i.e. disconnected completely for real
- [23:21] <WaTaKiD> 2013-09-12 12:28:11 <Jes> bots freeze when no players are around
- [23:21] <WaTaKiD> 2013-09-12 12:28:13 <Jes> much like monsters
- [23:23] <arkore> yes, but the bot is still there on the server. there's no way for me to execute "removebots" when everyone leaves the server.
- [23:23] <WaTaKiD> rcon puke
- [23:23] <WaTaKiD> >;p
- [23:23] <arkore> what does puke do?
- [23:23] <WaTaKiD> puke can execute a script
- [23:24] <Qent> well i'm wondering if all the ACS freezes along with bots and monsters because i r server i r so smrt
- [23:25] <arkore> WaTaKiD, cool, didn't know that. but, i can already execute a script. the problem is, there's no "event" for when a player exits a server when server is running a gamemode such as "duel" in which case "DISCONNECT" scripts actually occur when a player goes Spectator, not when a player disconnects from the server.
- [23:25] <arkore> Qent, that may be right, because I can't come to any other conclusion.
- [23:26] <Qent> er
- [23:26] <Qent> DISCONNECT scripts do run when you exit a server
- [23:26] <Qent> try having two of yourself in the server
- 03[23:26] * agaures is now known as Guest74132
- [23:26] <Qent> so that one is still there to see it happen
- [23:26] <WaTaKiD> perhaps this could help for something in the future: http://zdoom.org/wiki/CCMDs:Debug#puke
- [23:26] <arkore> yes, Qent, but "script 6 (int player) DISCONNECT { ConsoleCommand("removebots"); }" is not working. it only works when I leave a duel and go into spectator.
- [23:27] <Qent> hm
- [23:27] <Qent> that's weird
- [23:27] <arkore> yup
- [23:27] <Qent> it's supposed to consider both spectating and actual disconnects to be disconnects
- [23:27] <arkore> bug? or feature request?
- [23:28] * arkore heads over to the zandronum tracker.
- [23:28] <Qent> that's intended behavior and there are ways to work around it
- [23:31] <arkore> Qent, i don't see a way of working around it. There is only OPEN, ENTER, RETURN, RESPAWN, DEATH, LIGHTNING, UNLOADING, and DISCONNECT. And only "DISCONNECT" comes closest to what we need; but isn't quite doing what we expected. DISCONNECT only occurs when someone disconnects from a multiplayer game. how do we execute a script when someone disconnects from the server?
- [23:32] <Qent> if they're a spectator /already/ then i don't think there's an easy way to do it
- [23:33] <Qent> but are you saying if they're playing the game, and they disconnect without spectating, it won't run?
- [23:33] <arkore> correct
- [23:33] <arkore> while playing in the game/match, and they disconnect from server.
- [23:33] <Qent> even if there is another player who is still playing in-game
- [23:33] <arkore> yes.
- [23:34] <arkore> it works fine for when the person goes to spectator. the bots are removed. but doesn't work if the player directly disconnects from the server from within a game/match.
- [23:35] <arkore> that's my problem. because some people are just going to quit the game while in a fight, and then my script wont execute, and then the bot stays there forever.
- [23:40] <arkore> you see?
- [23:40] <Qent> hm
- [23:40] <Qent> it works as i'd expect for me
- [23:40] <Qent> playing the game and spectate, bots get removed
- [23:41] <Qent> playing the game and quit, bots stay but get removed when i reconnect (???)
- [23:41] <Qent> 2 people playing the game and one quits or spectates, bots get removed
- [23:42] <WaTaKiD> maybe cuz nobody was in the server, the script couldnt activate or w/e ?
- [23:42] <Qent> i think so
- [23:42] <Qent> could be a problem since people don't like empty servers with a lot of bots
- [23:43] <Qent> maybe the problem is how you're counting "still in-game" people
- [23:43] <arkore> i even tried without the "ingame counting logic"
- [23:43] <arkore> i stripped all that out, and just tried: script 6 (int player) DISCONNECT { ConsoleCommand("removebots"); }
- [23:44] <Qent> yes that's what worked for me
- [23:44] <arkore> yes, it works if you spectate, but not if you quit game while fighting
- [23:44] <Qent> it did for me (with another player)
- [23:44] <WaTaKiD> well technically the script works right? it just activates too late or something
- [23:45] <arkore> Qent (with another player)? does that mean 2 players, and 1 bot?
- [23:45] <Qent> yes
- [23:45] <arkore> ok, but what about 1 player and 1 bot. when the player disconnects the server while fighting, the bot is not removed.
- [23:45] <Qent> is it removed when you reconnect to the server?
- [23:46] <arkore> woah. yes. wtf
- [23:46] <Qent> ikr.
- [23:46] <arkore> so, the script is paused?
- [23:46] <arkore> until real clients connect or something
- [23:47] <Qent> i...guess so?
- [23:47] <WaTaKiD> so it looks like monsters, bots, and scripts all freeze/pause while no players are connected to the server, but resume once someone connectsa
- [23:47] <WaTaKiD> -a
- [23:47] <arkore> is there a way around this? because if the bot remains there, then best-ever will be mad.
- [23:47] <arkore> WaTaKiD, looks that way.
- [23:47] <Qent> yeah they will :/
- [23:47] <arkore> what you recommend i do, Qent? "feature request" on zandro tracker?
- [23:47] <Qent> yep!
- [23:47] <Qent> i don't see anything else for it
- [23:48] <Qent> you literally can't do ANYTHING because it's paused
- [23:48] <arkore> if you were me, how would you phrase the feature request? like, what i mean is, what exactly would you ask for?
- [23:48] <Qent> eeeeeeeeeeeeeeeeeeeee I'm not sure.
- [23:48] * Qent is too tired
- [23:48] <arkore> yah. me too. i guess i'll just explain the issue, and ask for a feature request for them to figure out a way around this.
- [23:48] * WaTaKiD is too inexperienced
- [23:49] <arkore> WaTaKiD, your face is inexperienced
- [23:49] <Qent> on the one hand you could ask that the server NOT be paused, and that would be super general but probably break something else
- [23:49] <WaTaKiD> go wash my face
- [23:49] <WaTaKiD> wat
- [23:49] <arkore> lol
- [23:49] <arkore> Qent, yah, probably a lot of good things come from that "pause" being on.
- [23:49] <Qent> or you could specifically ask for a cvar that removed all bots when the server is empty, and then it would only be useful for the crappy zandronum bots
- [23:49] <WaTaKiD> or have some way to activate that script the very exact moment the player leaves
- [23:49] <arkore> have to think of another way around it.
- [23:50] <Qent> impossible, they can exit instantly
- [23:50] <arkore> cvar sounds nice
- [23:50] <WaTaKiD> oh well, wut do i know :p
- [23:50] <WaTaKiD> bots are crap anyways, ban them all
- [23:50] <Qent> lol
- [23:50] <WaTaKiD> they make me look like a good player
- [23:51] <arkore> WaTaKiD, bots in my mod are actually fun. it's a simple 1-room arena map with all weapons given to the bot, and set botskill to highest "4", and it's pretty fun.
- [23:51] <arkore> better than "nothing"(no other players connecting/playing because they're too cool to try my god damn wad)
- [23:51] <WaTaKiD> ur wads suck i hate u go drown in chillax
- [23:51] <WaTaKiD> :D
- [23:51] <arkore> lol
- [23:54] <Qent> come to think of it, maybe a cvar is better, because eventually they will have to convert it not to use consolecommand
- [23:54] <WaTaKiD> oh yea huh
- [23:55] <WaTaKiD> sv_removebotswhenserverisempty
- [23:55] <WaTaKiD> since they love commands named like that :D
- [23:55] <Qent> lol
- [23:55] <Qent> but then you gotta wonder how you'd get the bots BACK
- [23:56] <arkore> i already have that part covered. a bot joins when a player enters the arena.
- [23:56] <Qent> an acs function AddBot(str name, int team)?
- [23:56] <Qent> i mean without consolecommand
- [23:56] <WaTaKiD> gasp
- [23:56] <Qent> le gasp!
- [23:56] <WaTaKiD> sv_addbotwhensomeonejoinsthegame
- [23:56] <arkore> team? bots aren't coop yet.
Advertisement
Add Comment
Please, Sign In to add comment