Using OnAIUpdate with a device that takes time to recharge

A place to discuss mods in development and concepts for new mods.
User avatar
Fleet Officer
Fleet Officer
Posts: 1452
Joined: Tue Aug 19, 2014 10:17 pm

Fri Jul 01, 2016 1:48 am

So there's no need to check for Nil on object variables(like Target)?

Militia Commander
Militia Commander
Posts: 426
Joined: Tue Mar 05, 2013 8:26 am

Fri Jul 01, 2016 2:15 am

If (objGetTarget gSource) returns nil, then (setq target (objGetTarget gSource)) also returns nil, so (and ... (setq target (objGetTarget gSource)) ...) returns nil and nothing happens.

JohnBWatson wrote:In addition, does anyone know what powerToActivate is, exactly? It would be immensely helpful if I had a formula that could convert that value to an integer to be used by our makeshift timer.
I believe powerToActivate is the amount of energy required to activate the device or fully charge the capacitor in real fuel units (1 He3 fuel rod = 2500). It won't affect the AI because the game doesn't track nonplayer objects' fuel and energy use.

Post Reply