Out of juice event callback
Posted: Mon Sep 15, 2008 3:56 am
In the original game Privateer, when energy ran out, it triggered a change in shield setting, and I wonder if there's an easy way to implement that.
It goes as follows:
Say you hit afterburner, and it consumes more energy than your power plant can produce.
The energy reservoir keeps going down....
When energy hits bottom, the afterburner would start sputtering.
This we got right.
But after a few seconds of sputtering, the shields would automatically go down to a 2/3 strength setting.
Then your energy would start going up again.
Where would be the code to look at to try and implement this behavior?
It goes as follows:
Say you hit afterburner, and it consumes more energy than your power plant can produce.
The energy reservoir keeps going down....
When energy hits bottom, the afterburner would start sputtering.
This we got right.
But after a few seconds of sputtering, the shields would automatically go down to a 2/3 strength setting.
Then your energy would start going up again.
Where would be the code to look at to try and implement this behavior?