Author Topic: Ship Killing  (Read 2206 times)

Offline USS Frontier

  • Posts: 176
  • Cookies: 562
Ship Killing
« on: March 12, 2009, 10:15:28 PM »
When a ship is destroyed, is it possible to acquire which ship destroyed her?

I didn't had time today to play around with the OBJECT_DESTROYED event to see if that's possible by the event. And the other idea I had to check that would require lot of event handling and data meaning performance wise it probably won't be good...

I just need to check which ship killed the other when this last one is destroyed, for hmmm... statistical purposes  :D
"Revenge is a dish best served cold"
                    -Old Klingon Proverb
GravityFX Download
Galaxy Charts Download

Offline LJ

  • Retired Staff
  • Posts: 1661
  • Cookies: 1139
Re: Ship Killing
« Reply #1 on: March 12, 2009, 11:50:07 PM »
I imagine so.  AFIK this is a feature in multiplayer because they have a menu of kill counts. :-)  See if there is anything in the scripts?

Hehe I can only imagine what evil things your are planning by keeping statistics on ships. :-p

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Ship Killing
« Reply #2 on: March 13, 2009, 12:49:57 PM »
Just took a litle stroll through app.py, and I found SetDestroyBrokenSystems and IsDestroyBrokenSystems, could also be interesting to poke at one of these days. Aside from that detour, there is also DestroySystem, and yet again aside from that, not much on "destroy".


I suppose the problem sets in when you use a script to launch torpedoes, you don't neccesairly need to have "ship" attached to it.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline USS Frontier

  • Posts: 176
  • Cookies: 562
Re: Ship Killing
« Reply #3 on: March 13, 2009, 07:48:07 PM »
Yeah I remember MP has that count. But I didn't remember seeing anything about it in the scripts so I just came here, tho the last time I looked in the MP scripts was sooome months ago... :P

It's not for evil things. It's more like kinda-a-bit-more-serious-easter-eggs  :lol:
I'm keeping other statistics as well but this "kill count" is the one I didn't know how to implement.


Hmmm... But what if there is anything on other names, like "kill" or something like that? I'll take a look at App.py searching for it later...
Yeah... But at least there isn't many scripts that launch torpedoes with the intent of damaging other ships, and many of these set the torp's parent ID, which could give us who shot the ship down.
But then again there are other scripts which can kill ships and are not torp related...
"Revenge is a dish best served cold"
                    -Old Klingon Proverb
GravityFX Download
Galaxy Charts Download

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Ship Killing
« Reply #4 on: March 14, 2009, 12:39:07 PM »
But for the other ways we can't really influence them. Except setting the condition to 0. :mrgreen:

In the Game object there are a couple of statistics, GetKills, GetTorpsFired, GetTorpsHit
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2207
  • Cookies: 1708
  • Life is life
Re: Ship Killing
« Reply #5 on: March 14, 2009, 02:10:11 PM »
ET_OBJECT_EXPLODING

Code: [Select]
pEvent.GetFiringPlayerID()
Acta, non verba.
aka USS Sovereign

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Ship Killing
« Reply #6 on: March 14, 2009, 02:24:18 PM »
That's from the WeaponHitEvent class.

But what happens when a ship is destroyed from collision? Or won't that count as a kill?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Mario

  • Senior Software Developer
  • Administrator
  • Posts: 2207
  • Cookies: 1708
  • Life is life
Re: Ship Killing
« Reply #7 on: March 14, 2009, 02:34:38 PM »
Quote
But what happens when a ship is destroyed from collision?

You still get the ID of the ship.
Acta, non verba.
aka USS Sovereign