New scripts for AI not related in wiki.
Moderators: winston, another_commander
-
- Poor
- Posts: 5
- Joined: Sun Oct 12, 2008 8:22 pm
- Contact:
New scripts for AI not related in wiki.
I'm looking for script not related in wiki.
checkForEnergyStatus: Will return the percentage of the energy at this moment (0.0=0%, 1.0=100%)
performContinouslyAttack: Will continue to attack the target without pause until weapon heat or recive TARGET_DESTROY or TARGET_LOST
Anyone help me? If do not exists these script, how can I make this? In java? In C++? There is tutorial?
Thanks lot!
checkForEnergyStatus: Will return the percentage of the energy at this moment (0.0=0%, 1.0=100%)
performContinouslyAttack: Will continue to attack the target without pause until weapon heat or recive TARGET_DESTROY or TARGET_LOST
Anyone help me? If do not exists these script, how can I make this? In java? In C++? There is tutorial?
Thanks lot!
I've played to Elite in the 1988.
Now I play Oolite.
Now I play Oolite.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Hi!
To your first request: While the current energy of a ship is obviously known to the engine, and can be displayed with the JS-console, it is indeed not a JS property. Therefore you cannot query it. So the solution would be to make a scripting request in the appropriate thread.
I guess the implementation would be as a JS-property of the ship. Then you can query it via ship-script, which is as good as directly in the AI.
To your second request: performAttack in its current form is working continuously. So please don't repeat the command in your AI, because then the only thing your ship will do is to start its attack routine over and over again.
For an example of a "fight-do-death" AI that will not turn around and flee you may contact LittleBear, who has something like that in the upcoming version of Random Hits.oxp.
To your first request: While the current energy of a ship is obviously known to the engine, and can be displayed with the JS-console, it is indeed not a JS property. Therefore you cannot query it. So the solution would be to make a scripting request in the appropriate thread.
I guess the implementation would be as a JS-property of the ship. Then you can query it via ship-script, which is as good as directly in the AI.
To your second request: performAttack in its current form is working continuously. So please don't repeat the command in your AI, because then the only thing your ship will do is to start its attack routine over and over again.
For an example of a "fight-do-death" AI that will not turn around and flee you may contact LittleBear, who has something like that in the upcoming version of Random Hits.oxp.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Ships only break off an attack if an AI command tells them to. To make a ship "sensible" you can add ENERGY_LOW= "[do stuff]" (for example make it do a moral check by rolling a dice and deciding to flee, jump out or keep fighting). Similar checks can be done with INCOMING_MISSILE. If you omitt these then you have a state that fights until destroyed.
This State may run away if badly hurt:-
When low on shields it "Considers" what it should do in the MARK_HURT state:-
But this one will keep fighting until it or its target is dead (although it will have the sense to run if a q-mine is deployed!) :-
Here's the whole AI if you want to follow the ships's "choices" through:-
This State may run away if badly hurt:-
Code: Select all
"ATTACK_SHIP" = {
ENTER = ("sendTargetCommsMessage: [mark-fighting]", performAttack);
"ATTACKED" = (fireMissile, setTargetToPrimaryAggressor);
"ENERGY_LOW" = ("setStateTo: MARK_HURT");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile);
"TARGET_DESTROYED" = ("setStateTo: SEARCH_AGAIN");
"TARGET_LOST" = ("setStateTo: SEARCH_AGAIN");
"FRUSTRATED" = (performAttack);
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE");
EXIT = (); };
Code: Select all
"MARK_HURT" = {
ENTER = ("rollD: 9");
"ENERGY_LOW" = (fireMissile);
"ROLL_1" = ("setStateTo: JUMP_OUT");
"ROLL_2" = ("setStateTo: JUMP_OUT");
"ROLL_3" = ("setStateTo: JUMP_OUT");
"ROLL_4" = ("setStateTo: BEG_FOR_LIFE");
"ROLL_5" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_6" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_7" = ("setStateTo: FIGHT_TO_DEATH");
"ROLL_8" = ("setStateTo: FIGHT_TO_DEATH");
"ROLL_9" = ("setStateTo: FIGHT_TO_DEATH");
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE"); };
Code: Select all
"FIGHT_TO_DEATH" = {
ENTER = (performAttack);
"ATTACKED" = (setTargetToPrimaryAggressor);
"ENERGY_LOW" = (fireMissile);
"INCOMING_MISSILE" = (fireMissile, setTargetToPrimaryAggressor, fightOrFleeMissile);
"TARGET_DESTROYED" = ("setStateTo: SEARCH_AGAIN");
"TARGET_LOST" = ("setStateTo: SEARCH_AGAIN");
"FRUSTRATED" = (performAttack);
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE"); };
Here's the whole AI if you want to follow the ships's "choices" through:-
Code: Select all
{
GLOBAL = {
ENTER = ();
EXIT = ();
UPDATE = ("pauseAI: 1.0", "setSpeedFactorTo: 0.75", performIdle, "setStateTo: DECIDE_COURSE"); };
"DECIDE_COURSE" = {
ENTER = ( "rollD: 2");
"ENERGY_LOW" = (fireMissile);
"ROLL_1" = ("setStateTo: GO_TO_WITCHPOINT");
"ROLL_2" = ("setStateTo: GO_TO_STATION");
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("scanForNearestShipWithRole: EQ_QC_MINE"); };
"GO_TO_STATION" = {
ENTER = ("setSpeedFactorTo: 0.75", "scanForNearestShipWithRole: player");
"ENERGY_LOW" = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: REACT_TO_PLAYER");
"NOTHING_FOUND" = (setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.75", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_WITCHPOINT");
"AEGIS_IN_DOCKING_RANGE" = ("setStateTo: GO_TO_WITCHPOINT");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, setTargetToPrimaryAggressor, "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: FLEE_NPC_ATTACK");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: player");
EXIT = ();
};
"GO_TO_WITCHPOINT" = {
ENTER = ("setSpeedFactorTo: 0.75", "scanForNearestShipWithRole: player");
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: REACT_TO_PLAYER");
"NOTHING_FOUND" = (setDestinationToWitchpoint, "setDesiredRangeTo: 1000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.75", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_STATION");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: FLEE_NPC_ATTACK");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: player");
EXIT = ();
};
"FLEE_NPC_ATTACK" = {
ENTER = ("addFuel: 3", "setSpeedFactorTo: 2.0", "setDesiredRangeTo: 25600", performFlee);
"ENERGY_LOW" = ();
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, performFlee);
ATTACKED = (setTargetToPrimaryAggressor, performFlee);
"TARGET_LOST" = (performIdle, "addFuel: -3", "setStateTo: DECIDE_COURSE");
"TARGET_DESTROYED" = (performIdle, "addFuel: -3", "setStateTo: DECIDE_COURSE");
EXIT = ();
"REACHED_SAFETY" = (performIdle, "addFuel: -3", "setStateTo: DECIDE_COURSE");
UPDATE = (); };
"REACT_TO_PLAYER" = {
ENTER = ("rollD: 9");
"ENERGY_LOW" = (fireMissile);
"ROLL_1" = ("setStateTo: FOUND_PLAYER_HURRY_ON_COURSE");
"ROLL_2" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_3" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_4" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_5" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_6" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_7" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_8" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_9" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE"); };
"FOUND_PLAYER_HURRY_ON_COURSE" = {
ENTER = ("setSpeedFactorTo: 1.1");
"ENERGY_LOW" = ();
"COURSE_OK" = ("setSpeedFactorTo: 1.1", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECIDE_COURSE");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: REACT_TO_PLAYER_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: REACT_TO_PLAYER_ATTACK");
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE");
EXIT = (); };
"FOUND_PLAYER_FLEE_PLAYER" = {
ENTER = (fireMissile, "commsMessage: [mark-fleeing]", "addFuel: 2", "setSpeedFactorTo: 2.0", "setDesiredRangeTo: 25600", performFlee);
"ENERGY_LOW" = (fireMissile);
"INCOMING_MISSILE" = (fireMissile, setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: REACT_TO_PLAYER_ATTACK");
ATTACKED = (fireMissile, setTargetToPrimaryAggressor, "setStateTo: REACT_TO_PLAYER_ATTACK");
"TARGET_LOST" = (performIdle, "addFuel: -2", "setStateTo: DECIDE_COURSE");
"TARGET_DESTROYED" = (performIdle, "addFuel: -2", "setStateTo: DECIDE_COURSE");
EXIT = ();
"REACHED_SAFETY" = (performIdle, "addFuel: -2", "setStateTo: DECIDE_COURSE");
UPDATE = (); };
"FOUND_PLAYER_FIGHT_PLAYER" = {
ENTER = ("scanForNearestShipWithRole: player");
"ENERGY_LOW" = (fireMissile);
"TARGET_FOUND" = (setTargetToFoundTarget, setTargetToPrimaryAggressor, "setStateTo: ATTACK_SHIP");
"NOTHING_FOUND" = ("setStateTo: DECIDE_COURSE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: player"); };
"ATTACK_SHIP" = {
ENTER = (fireMissile, "sendTargetCommsMessage: [mark-fighting]", performAttack);
"ATTACKED" = (fireMissile, setTargetToPrimaryAggressor);
"ENERGY_LOW" = ("setStateTo: MARK_HURT");
"INCOMING_MISSILE" = (fireMissile, setTargetToPrimaryAggressor, fightOrFleeMissile);
"TARGET_DESTROYED" = ("setStateTo: SEARCH_AGAIN");
"TARGET_LOST" = ("setStateTo: SEARCH_AGAIN");
"FRUSTRATED" = (performAttack);
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE");
EXIT = (); };
"SEARCH_AGAIN" = {
ENTER = ("scanForNearestShipWithRole: player");
"ENERGY_LOW" = (fireMissile);
"TARGET_FOUND" = (setTargetToFoundTarget, setTargetToPrimaryAggressor, "setStateTo: FIGHT_TO_DEATH");
"NOTHING_FOUND" = ("setStateTo: NO_HAILS_FLY_TO_STATION");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: player"); };
"NO_HAILS_FLY_TO_STATION" = {
ENTER = ("setSpeedFactorTo: 0.75", "scanForNearestShipWithRole: player");
"ENERGY_LOW" = (fireMissile);
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FIGHT_TO_DEATH");
"NOTHING_FOUND" = (setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
"COURSE_OK" = ("setSpeedFactorTo: 0.75", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_WITCHPOINT");
"AEGIS_IN_DOCKING_RANGE" = ("setStateTo: GO_TO_WITCHPOINT");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: FLEE_NPC_ATTACK");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: player");
EXIT = ();
};
"REACT_TO_PLAYER_ATTACK" = {
ENTER = ("rollD: 9");
"ENERGY_LOW" = (fireMissile);
"ROLL_1" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_2" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_3" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_4" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_5" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_6" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_7" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_8" = ("setStateTo: FOUND_PLAYER_FIGHT_PLAYER");
"ROLL_9" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE"); };
"MARK_HURT" = {
ENTER = ("rollD: 9");
"ENERGY_LOW" = (fireMissile);
"ROLL_1" = ("setStateTo: JUMP_OUT");
"ROLL_2" = ("setStateTo: JUMP_OUT");
"ROLL_3" = ("setStateTo: JUMP_OUT");
"ROLL_4" = ("setStateTo: BEG_FOR_LIFE");
"ROLL_5" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_6" = ("setStateTo: FOUND_PLAYER_FLEE_PLAYER");
"ROLL_7" = ("setStateTo: FIGHT_TO_DEATH");
"ROLL_8" = ("setStateTo: FIGHT_TO_DEATH");
"ROLL_9" = ("setStateTo: FIGHT_TO_DEATH");
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE"); };
"FIGHT_TO_DEATH" = {
ENTER = (fireMissile, performAttack);
"ATTACKED" = (fireMissile, setTargetToPrimaryAggressor);
"ENERGY_LOW" = (fireMissile);
"INCOMING_MISSILE" = (fireMissile, setTargetToPrimaryAggressor, fightOrFleeMissile);
"TARGET_DESTROYED" = ("setStateTo: SEARCH_AGAIN");
"TARGET_LOST" = ("setStateTo: SEARCH_AGAIN");
"FRUSTRATED" = (performAttack);
EXIT = ();
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE"); };
"BEG_FOR_LIFE" = {
ENTER = ("commsMessage: [mark-begging]", setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination, "setSpeedFactorTo: 0.5");
"ENERGY_LOW" = ();
"COURSE_OK" = ("setSpeedFactorTo: 0.5", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_WITCHPOINT");
"AEGIS_IN_DOCKING_RANGE" = ("setStateTo: GO_TO_WITCHPOINT");
"INCOMING_MISSILE" = (setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: BEG_FAILED");
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: BEG_FAILED");
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: FLEE_MINE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: EQ_QC_MINE");
EXIT = (); };
"BEG_FAILED" = {
ENTER = (fireMissile, "scanForNearestShipWithRole: player");
"ENERGY_LOW" = (fireMissile);
"TARGET_FOUND" = (setTargetToFoundTarget, setTargetToPrimaryAggressor, "setStateTo: FIGHT_TO_DEATH");
"NOTHING_FOUND" = ("setStateTo: DECIDE_COURSE");
UPDATE = ("pauseAI: 1.0", "scanForNearestShipWithRole: player"); };
"JUMP_OUT" = {
ENTER = (fireMissile, "commsMessage: [mark-jumping]", "safeScriptActionOnTarget: set: mission_random_hits_status JUMPING", "addFuel: 7", performHyperSpaceExitWithoutReplacing);
EXIT = ();
UPDATE = ("pauseAI: 1.0", performHyperSpaceExitWithoutReplacing);
"ENERGY_LOW" = (fireMissile);
"INCOMING_MISSILE" = (fireMissile, fightOrFleeMissile, setTargetToPrimaryAggressor, "setStateTo: FLEE_NPC_ATTACK");
ATTACKED = (fireMissile, setTargetToPrimaryAggressor, "setStateTo: FLEE_NPC_ATTACK");
"WITCHSPACE OKAY" = (wormholeEscorts);
"WITCHSPACE BLOCKED" = (setTargetToFoundTarget, setDestinationWithinTarget, "setDesiredRangeTo: 10000.0", performFlyToRangeFromDestination);
"WITCHSPACE UNAVAILABLE" = ("addFuel: -7", "setStateTo: FIGHT_TO_DEATH");
};
"FLEE_MINE" = {
ENTER = (fireMissile, "rollD: 3");
"ROLL_1" = ("setStateTo: JUMP_OUT");
"ROLL_2" = ("setStateTo: JUMP_OUT");
"ROLL_3" = ("setStateTo: MINE_RUN");
UPDATE = ();
EXIT = (); };
"MINE_RUN" = {
ENTER = ("commsMessage: [mine-fleeing]", setDestinationToTarget, "addFuel: 7", "setSpeedFactorTo: 2.0", "setDesiredRangeTo: 35600", performFlee);
"ENERGY_LOW" = (fireMissile);
"ATTACKED" = (fireMissile, setTargetToPrimaryAggressor, "setStateTo: FIGHT_TO_DEATH");
"INCOMING_MISSILE" = (fireMissile, setTargetToPrimaryAggressor, fightOrFleeMissile, "setStateTo: FIGHT_TO_DEATH");
EXIT = ();
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: DECIDE_COURSE");
"GONE_BEYOND_RANGE" = ("setStateTo: DECIDE_COURSE");
UPDATE = ("pauseAI: 1.0", checkDistanceTravelled); };
}
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: New scripts for AI not related in wiki.
Most of the things you can already handle with "ENERGY_LOW" and "ENERGY_FULL".skypatrikelite wrote:checkForEnergyStatus: Will return the percentage of the energy at this moment (0.0=0%, 1.0=100%)
You can directly access the energy over a "sendScriptMessage" and a JS script. McLane missed those two. Energy property is not in ship but in entity. To get a percentage you have energy and maxEnergy available.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Yes it is. Ships inherit energy and maxEnergy from Entity.Commander McLane wrote:To your first request: While the current energy of a ship is obviously known to the engine, and can be displayed with the JS-console, it is indeed not a JS property. Therefore you cannot query it.
E-mail: [email protected]
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: New scripts for AI not related in wiki.
A small and probably understandable oxp with two-way communication between AI and JS is drones.oxp by Thargoid. You can take a look at that one.skypatrikelite wrote:Anyone help me? If do not exists these script, how can I make this? In java? In C++? There is tutorial?
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Eric Walch wrote:Most of the things you can already handle with "ENERGY_LOW" and "ENERGY_FULL".skypatrikelite wrote:checkForEnergyStatus: Will return the percentage of the energy at this moment (0.0=0%, 1.0=100%)
You can directly access the energy over a "sendScriptMessage" and a JS script. McLane missed those two. Energy property is not in ship but in entity. To get a percentage you have energy and maxEnergy available.
I missed that indeed. It didn't occur to me that it could be somewhere else than in ship. Thanks for enlightening me once more!
Perhaps the existence of the EEU and ECD from the Energy Equipment OXP might also have been a clue?
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
-
- Poor
- Posts: 5
- Joined: Sun Oct 12, 2008 8:22 pm
- Contact: