MantisBT - Zandronum
View Issue Details
0000318Zandronum[All Projects] Suggestionpublic2011-03-08 13:032015-09-10 10:06
Dusk 
 
normalfeatureN/A
closedno change required 
LinuxDebian6.0 "Squeeze"
98d 
 
0000318: CONNECT script type
Hi, one of the things that really bug me in ACS scripting is the inability to catch spectators connecting to the game - therefore, I'd propose a new CONNECT script type, which would be like ENTER but gets executed when a player connects to the server.

One thing bugs me, though - can a spectator be executed ACS scripts on or would this require a structure similar to DISCONNECT which would only give a player's number and have the script be executed by the world? Ideally, this script type would work like the former.

I'd appreciate this script type very much, thanks for reading this.
acs, Multiplayer, spectator
Issue History
2011-03-08 13:03DuskNew Issue
2011-03-09 03:39Blzut3Note Added: 0001144
2011-03-09 14:10DuskNote Added: 0001145
2011-03-31 17:53kgswsNote Added: 0001242
2011-04-01 01:38Torr SamahoNote Added: 0001246
2011-04-01 11:08DuskNote Added: 0001248
2011-04-02 21:16kgswsNote Added: 0001253
2011-04-03 16:50Torr SamahoNote Added: 0001273
2011-04-03 17:01Torr SamahoNote Edited: 0001273bug_revision_view_page.php?bugnote_id=1273#r654
2011-04-03 22:26Torr SamahoStatusnew => feedback
2011-04-04 02:48kgswsNote Added: 0001284
2011-04-04 02:50kgswsNote Edited: 0001284bug_revision_view_page.php?bugnote_id=1284#r661
2015-09-10 10:06DuskNote Added: 0013471
2015-09-10 10:06DuskStatusfeedback => new
2015-09-10 10:06DuskStatusnew => closed
2015-09-10 10:06DuskResolutionopen => no change required

Notes
(0001144)
Blzut3   
2011-03-09 03:39   
The problem is spectator are not players and are not supposed to be able to interact with the game (scripting or otherwise). If things are working properly I don't think spectators have any influence on the player count.

Although I haven't really watched every discussion, has anyone demonstrated a good reason why they need to know when spectators enter and leave a server?
(0001145)
Dusk   
2011-03-09 14:10   
It would be useful for instance to tell them how the game is going via hudmessages or execute clientside scripts for effects that being server-side would be bandwidth costly.

I'd be really happy even if CONNECT scripts were only clientside. It's very hard to communicate with spectators at the moment via ACS. :/
(0001242)
kgsws   
2011-03-31 17:53   
Very good idea, and no, it won't be like DISCONNECT, spectator is already on server and has its body, you can even give inventory items to spectators and they can use it. (you can try it with some existing items like ArtiTeleport)
(0001246)
Torr Samaho   
2011-04-01 01:38   
> execute clientside scripts for effects that being server-side would be bandwidth costly.

Can you give a specific example for this? Since spectators themselves are not supposed to interact with the game in any way, using a clientside OPEN script probably would be better.

> you can even give inventory items to spectators and they can use it. (you can try it with some existing items like ArtiTeleport)

In any recent Skulltag version, spectators should have no inventory. Are you sure that you can still give them items and if yes, how can you do so?
(0001248)
Dusk   
2011-04-01 11:08   
Take HudMessageBold status huds that display information to all clients - these HUDs cannot be clientsided even if clients knew all information to print the HUDs, because spectators wouldn't be able to draw them when they connect.

Or, take AOW's building health HUD. Since clients do not know any actor's health, these cannot be clientsided. The said HUD is also very bandwidth intensive and I'd like to nail that by only partially refreshing when really necessary. However, if I did this, spectators would end up with no health bars whatsoever - if CONNECT script would exist, it could issue a ConsoleCommand with "puke -999" or whatever to get the health hud from the server.

Or, take another issue with AOW - when spectators connect, they end up in the locker room because all player starts reside in them. The only way to get out of the locker room is through switches that call ACS that end up teleporting the player. So, there is a CCMD made for spectators so that they can get out of the locker room and this tends to be an... inconvenience especially since most users apparently do not know the existence of the command. With this kind of script type, spectators could be teleported out of the locker room instantly.
(0001253)
kgsws   
2011-04-02 21:16   
> In any recent Skulltag version, spectators should have no inventory. Are you sure that you can still give them items and if yes, how can you do so?
In latest non-beta version, on cheat server i can give myself inventory items and use them as spectator. I assume it will also work with ACS on non-cheat version.
(0001273)
Torr Samaho   
2011-04-03 16:50   
(edited on: 2011-04-03 17:01)
> Take HudMessageBold status huds that display information to all clients - these HUDs cannot be clientsided even if clients knew all information to print the HUDs, because spectators wouldn't be able to draw them when they connect.

If the HUD should be the same for everybody, I don't see why you can't put it into a clientside OPEN script.

> Or, take AOW's building health HUD. Since clients do not know any actor's health, these cannot be clientsided.

This is completely separate from your request.

> The said HUD is also very bandwidth intensive and I'd like to nail that by only partially refreshing when really necessary. However, if I did this, spectators would end up with no health bars whatsoever

HudMessageBold should be visible for spectators.

> if CONNECT script would exist, it could issue a ConsoleCommand with "puke -999" or whatever to get the health hud from the server.

Why can't you put this in an OPEN script?

> Or, take another issue with AOW - when spectators connect, they end up in the locker room because all player starts reside in them.

This is an interesting point. It would be nice to do something about this. There are other requests though that aim at solving similar problems and wouldn't require any changes of the map or the map scripts. For instance, 0000029.

> In latest non-beta version, on cheat server i can give myself inventory items and use them as spectator.

I didn't invest much time to prevent the player from breaking the game by using cheats.

>I assume it will also work with ACS on non-cheat version.

If this works, it's a bug.

(0001284)
kgsws   
2011-04-04 02:48   
(edited on: 2011-04-04 02:50)
> If the HUD should be the same for everybody, I don't see why you can't put it into a clientside OPEN script. --> Or, take AOW's building health HUD. Since clients do not know any actor's health, these cannot be clientsided.

To use less traffic. Constant loop with HudMessageBold is wasting of traffic. It is better to send only changes, good example is "AOW's building health HUD" - use HudMessageBold only if health change occurs or new player joins. Because new spectator does not trigger any script type, it is not possible to find out when to update this part of HUD. Of course spectators will see it when change occurs.

Also, it will be possible to make some kind of pre-join menu using CONNECT script. (this is already possible now, but "puke" command is needed to start it)

(0013471)
Dusk   
2015-09-10 10:06   
Closing as OPEN CLIENTSIDE scripts run on connection