For test results, bug reports, announcements of new builds etc.
Moderators: winston , another_commander , Getafix
Commander McLane
---- E L I T E ----
Posts: 9520 Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:
Post
by Commander McLane » Tue Aug 27, 2013 9:47 pm
The
Wiki claims that the
shipTakingDamage
handler for the player ship only fires after shields are down. This appears not to be the case. I have it firing with my shields full as well.
So, is it a bug, or is the Wiki just wrong or outdated? (I'd prefer the latter, because it makes sense to catch all cases when something is hitting your ship.)
cim
Quite Grand Sub-Admiral
Posts: 4072 Joined: Fri Nov 11, 2011 6:19 pm
Post
by cim » Tue Aug 27, 2013 10:09 pm
Commander McLane wrote: So, is it a bug, or is the Wiki just wrong or outdated?
The Wiki is wrong - and now changed, which was the bit which was forgotten the last few times this question came up...
Eric Walch
Slightly Grand Rear Admiral
Posts: 5536 Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands
Post
by Eric Walch » Wed Aug 28, 2013 8:37 am
It was indeed always firing. I always handled it in my test script as:
Code: Select all
this.shipTakingDamage = function (amount, whom, type)
{
if (amount> 0) log(this.name, "Player is sustaining " + amount + " units of " + type + " from: " + (whom?whom.name:"unknown"));
}
So checking if damage was > 0. In the other cases the shields absorbed the hit.
Commander McLane
---- E L I T E ----
Posts: 9520 Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:
Post
by Commander McLane » Wed Aug 28, 2013 9:04 am
Thanks for the answers (and the correction in the Wiki).