Using OnAIUpdate with a device that takes time to recharge
-
- Fleet Officer
- Posts: 1452
- Joined: Tue Aug 19, 2014 10:17 pm
So there's no need to check for Nil on object variables(like Target)?
If (objGetTarget gSource) returns nil, then (setq target (objGetTarget gSource)) also returns nil, so (and ... (setq target (objGetTarget gSource)) ...) returns nil and nothing happens.
Also:
Also:
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.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.
-
- Fleet Officer
- Posts: 1452
- Joined: Tue Aug 19, 2014 10:17 pm
Right, missed that that had a return value.