Ion recharging shield help please

Freeform discussion about anything related to modding Transcendence.
Post Reply
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

I've been trying to make a shield work that recharges when it's hit by an ion weapon.I can't get it to recharge. I know that the (shpRechargeShield) function is returning true, but it won't heal the shield any. The shield just takes the damage. My code is this for it:

Code: Select all

			<Events>
				<OnShieldDamage>
					(block nil
			
						(if (eq aDamageType 'ion) 
							(block (rechargeAmount)
							(setq rechargeAmount (multiply 2 aShieldDamageHP))
							(shpRechargeShield gSource rechargeAmount)
								
							
							)
						)
				
					)
				</OnShieldDamage>
			</Events>
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

If you read the wiki page on shields and the event you can see that you need to return a special list.

http://wiki.neurohack.com/transcendence ... ds_devices
Post Reply