<Events> triggered upon taking armor hit?

Freeform discussion about anything related to modding Transcendence.
Post Reply
TheLastBrunnenG
Commonwealth Pilot
Commonwealth Pilot
Posts: 86
Joined: Fri Dec 04, 2009 1:46 am

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?
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G
ImageImage
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I want to trigger an event every time the player's ship takes an armor hit.
TheLastBrunnenG,
you can use the new <OnDamageArmor> event that is for weapons:
http://wiki.neurohack.com/transcendence ... on_devices
TheLastBrunnenG
Commonwealth Pilot
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
ImageImage
User avatar
Betelgeuse
Fleet Officer
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!
Alex_
Anarchist
Anarchist
Posts: 14
Joined: Wed Dec 23, 2009 7:26 pm

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.
Post Reply