Simple code request, I hope: I want to trigger an event every time the player's ship takes an armor hit. Could be something as simple as displaying a message to the player: "Ouch! That hurt!"
Is there a function I can stick in an <Events> tag on the armor that would do this every time the armor was hit?
I could probably check something from within an <OnAIUpdate>, but that only checks every so often - I want to trigger a message (and later more, of course) upon every armor hit, real-time.
Ideas?
<Events> triggered upon taking armor hit?
-
- Commonwealth Pilot
- Posts: 86
- Joined: Fri Dec 04, 2009 1:46 am
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G


A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G


- digdug
- Fleet Admiral
- Posts: 2620
- Joined: Mon Oct 29, 2007 9:23 pm
- Location: Decoding hieroglyphics on Tan-Ru-Dorem
TheLastBrunnenG,I want to trigger an event every time the player's ship takes an armor hit.
you can use the new <OnDamageArmor> event that is for weapons:
http://wiki.neurohack.com/transcendence ... on_devices
-
- Commonwealth Pilot
- Posts: 86
- Joined: Fri Dec 04, 2009 1:46 am
I thought <OnDamageArmor> was for use in weapons. I'm looking for something I can put in the <Events> tag of the armor itself.
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G


A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G


- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
not currently we have them for the ship being hit and the weapon but not for the armor. But that is a high priority 1.1 thing.
Crying is not a proper retort!
Not sure, but you might be able to add an overlay to the playership <OnInstall> that uses <OnDamage> to do what you want. I think you might get freaky stuff happening if you ended up with multiple <OnDamage> overlays.
I guess it would work most of the time.
I guess it would work most of the time.