Fractal Softworks Forum
February 19, 2019, 02:18:45 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Starsector 0.9a is out! (11/16/18); In-dev patch notes for 0.9.1a (01/31/19)
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [BUG] beams that pierce missiles tags them as their damage target  (Read 142 times)
Tartiflette
Admiral
*****
Posts: 2562


Kickstarter is NOT a magic spring of free money!


View Profile Email
« on: February 17, 2019, 02:27:13 AM »

I have a beam that pierce missiles and use it's "damage target" for some scripted shenanigans. Problem is, if a missile goes through the beam, the damage target swap to that missile rather than the ship/asteroid/fighter that is still being hit just behind. I think it would be more logical if the damage target would always be the CombatEntity hit the farther away from the source (then most of the time that target will be an entity that actually stops the beam).
Logged

 
Alex
Administrator
Admiral
*****
Posts: 13166


View Profile
« Reply #1 on: February 17, 2019, 09:08:06 AM »

Hmm - are you sure? I just tested this - with a Sunder with a HIL sweeping up missiles shot by a Buffalo Mk.II - and getDamageTarget() for the HIL's ray never returned a missile. Not even when the missile was the only thing hit; getDamageTarget() only returns a target that stopped the beam (or, more precisely, a target that's not in the beam's pierce set).
Logged
Tartiflette
Admiral
*****
Posts: 2562


Kickstarter is NOT a magic spring of free money!


View Profile Email
« Reply #2 on: February 18, 2019, 12:08:22 AM »

Aw my bad. I was using an invisible beam and missed one pierce tag. Sorry about that, I'm rushing a surprise for the tournament's finals but I shouldn't cut corners nonetheless.
Logged

 
Alex
Administrator
Admiral
*****
Posts: 13166


View Profile
« Reply #3 on: February 18, 2019, 09:32:33 AM »

No worries, it's all good Smiley Looking forward to the next round!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2011, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!