JazHaz;
I found it not that hard to do, once I understand how it all worked. Hopefully I've explained everything OK. Adapting the FighterHud to 1680x1050 was fun, and it gave me a few ideas.
I will not be working with the FighterHud anymore... I think I want to put together my own hud; so for the time being, I am falling back to the default Oolite hud.
WHEN I get around to it, the dashboard (which will be completely opaque, but not-as-tall; text will not be obscured) will be rendered in my favorite raytracer;
http://www.povray.org
... it will probably be optimized for a 1680x1050 screen though.
ClymAngus;
Medusa was one of the ones that I download to study, and to learn from. I like the concept of integrating roll/pitch indicators with the compass.
What I WOULD LIKE to do, is to integrate status (or threat level; green, yellow, red) with the radar scanner display. The radar gridlines / outline would be green, yellow or red based on threat level (or blue if a certain piece of mission-related equipment is installed and active, thanks Kaks!). BUT I've searched the wiki, and I don't think Oolite has a way of extracting the player's current threat level at this time.
FighterHud Alpha
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
It has. Using JavaScript, you can query the player's alert condition usingJeffBTX wrote:BUT I've searched the wiki, and I don't think Oolite has a way of extracting the player's current threat level at this time.
Code: Select all
player.alertCondition
another_commander;
Ah! Found it, thanks, and also this:
I'm not sure how (if) it can be linked to a hud.plist (hopefully in a simple way)? Specifically this secton:
... and is affected by the Cloaking Device?
Ah! Found it, thanks, and also this:
Code: Select all
alertConditionChanged
The alertConditionChanged handler is called when the player’s alert status (player.alertCondition) changes. Only the player and stations have an alert condition. (world script and station scripts)
this.alertConditionChanged = function(newCondition, oldCondition)
{
// Your code here
}
Code: Select all
<dict><!-- scanner -->
<key>alpha</key>
<real>0.8</real>
<key>selector</key>
<string>drawScanner:</string>
<key>x</key>
<integer>1</integer>
<key>y</key>
<integer>-190</integer>
<key>height</key>
<real>62</real>
<key>width</key>
<real>182</real>
<key>rgb_color</key>
<array>
<real>0.5</real>
<real>1.0</real>
<real>0.5</real>
</array>
Code: Select all
player.alertCondition
Sword, thy name is Cobra. And Cobra has fangs!
Ah! Found it, thanks, and also this:
I'm not sure how (if) it can be linked to a hud.plist (hopefully in a simple way)? Specifically this section (rgb_color):
... and is affected by the Cloaking Device?
Code: Select all
alertConditionChanged
The alertConditionChanged handler is called when the player’s alert status (player.alertCondition) changes. Only the player and stations have an alert condition. (world script and station scripts)
this.alertConditionChanged = function(newCondition, oldCondition)
{
// Your code here
}
Code: Select all
<dict><!-- scanner -->
<key>alpha</key>
<real>0.8</real>
<key>selector</key>
<string>drawScanner:</string>
<key>x</key>
<integer>1</integer>
<key>y</key>
<integer>-190</integer>
<key>height</key>
<real>62</real>
<key>width</key>
<real>182</real>
<key>rgb_color</key>
<array>
<real>0.5</real>
<real>1.0</real>
<real>0.5</real>
</array>
Code: Select all
player.alertCondition
Sword, thy name is Cobra. And Cobra has fangs!