Author Topic: Multiplayer player deaths revisited  (Read 1429 times)

0 Members and 1 Guest are viewing this topic.

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Multiplayer player deaths revisited
I know we have the sexps now to determine the number of respawns for a ship and the number of deaths.  Problem is I can't seem to get it to work.  I'm storing respawns-left + 1  to a variable at mission start then checking each possible player ship to see if the ship-deaths = the respawn variable.  If they do then the event should trigger and the mission should end.  Event never triggers.  I don't know why though.  I did a test with Alpha 1 and it fires off the test message.  Starting to think ship-deaths doesn't work for the player AI ships. 
No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Multiplayer player deaths revisited
That's odd. The SEXP should work with player AI ships. The AI and the player ships get their respawn and ship-death counts in a different way since for the player I can just pull them out of the player information so it's quite possible that there is a bug in the way it's doing it for AI ships. In fact I can think of two possibilities off the top of my head.

Stick it in Mantis and assign it to me. Since it's a bug in my own code it will be top priority. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline FUBAR-BDHR

  • Self-Propelled Trouble Magnet
  • 212
  • Master Drunk
    • 165th Beer Drinking Hell Raisers
Re: Multiplayer player deaths revisited
Great another bug and just when you guys had me down below 20.   :D  http://scp.indiegames.us/mantis/view.php?id=1812

No-one ever listens to Zathras. Quite mad, they say. It is good that Zathras does not mind. He's even grown to like it. Oh yes. -Zathras

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Multiplayer player deaths revisited
I'm compiling as we speak. With luck I'll have you back below 20 again soon.

The problem was that when a player ship dies the variable I was using to check how many times it had died ( stats.m_player_deaths ) is updated. However with an AI ship there is no such variable and the one I was using (respawn_count) isn't updated the final time a ship dies (meaning that the SEXP had passed all my tests because I'd never actually killed my wingman for good).

I'll try getting the count in a different way now. 

EDIT : Fixed and in SVN
« Last Edit: November 10, 2008, 01:34:17 pm by karajorma »
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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