Author Topic: Operator for a player hit?  (Read 1536 times)

0 Members and 1 Guest are viewing this topic.

Offline sausage

  • 24
    • waynejohnson.net
Operator for a player hit?
Does anyone know if there is an event operator available that occurs when a player takes a hit? For example, in my mulitplayer mission, if another player scores a hit on you, I can then change the soundtrack to be a little more dramatic.

So for "campers", the music is moderate, for a hit, they are back in the action and I can "change-soundtrack".

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Operator for a player hit?
Won't work.

Although checking if the player is hit is fairly easy (hits-left will do it) there is no way to change the soundtrack for a specific client, you can only change the soundtrack for everyone.

To be honest I've never been keen on this level of micromanaging anyway, but that's more of a personal thing.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline sausage

  • 24
    • waynejohnson.net
Re: Operator for a player hit?
Thanks for that. I didn't realise it was a change for all. I figured it would be a per-player value.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Operator for a player hit?
Which soundtrack is playing is a per-player value. The code could be changed to pick a different soundtrack for each player pretty quickly. What is lacking is a method to get the information from the server to the clients telling a specific player to change soundtracks. It is possible to add that but it would break multiplayer compatibility with older builds. If you keep an eye out for next time one of the coders says that a change will break multiplayer it might be possible to add it then.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline sausage

  • 24
    • waynejohnson.net
Re: Operator for a player hit?
Ooer, I certainly wouldn't want to put any code at risk just for this little idea. I wouldn't think it that important for any of the SCP coders to concern themselves with.

 

Offline Goober5000

  • HLP Loremaster
  • 214
    • Goober5000 Productions
Re: Operator for a player hit?
I'm not sure why you would want to do this anyway, since the game soundtrack already changes (NRML1, BTTL1, BTTL2, BTTL3) based on what's happening in the mission.

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Operator for a player hit?
Yeah, that's what I meant by micromanaging. The code already does this pretty well anyway and unless changing soundtracks is done well it can be pretty jarring.

Ooer, I certainly wouldn't want to put any code at risk just for this little idea. I wouldn't think it that important for any of the SCP coders to concern themselves with.

Well I can see a usage for a client specific SEXP. For instance in TvT games.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]