Oolite Bulletins

For information and discussion about Oolite.
It is currently Tue May 23, 2017 10:44 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Apr 13, 2017 7:33 pm 
Offline
Dangerous
Dangerous
User avatar

Joined: Mon Feb 20, 2017 2:14 pm
Posts: 105
So I'm trying to figure out how to get the integer of the ship's current speed. Obviously that speed is measured in meters per second. Some HUDs do display that number and I downloaded two of them as example.

In the ExtraLarge HUD, I found this segment:
Code:
data_source = "combatSpeed"; selector = "drawCustomText:";
// alert_conditions = 2; //uncomment if you want to see in green alert only
alpha = 1.0; height = 13; width = 15; x = 211; y = 82; y_origin = -1; },
I placed the same in my hud.plist, but slightly changed, like so:
Code:
// SPEED IN M PER SECOND
{
	data_source = "combatSpeed"; selector = "drawCustomText:"; 
	alert_conditions = 14;
	alpha = 0.55; height = 13; width = 15; x = 0; y = 120; y_origin = 0; x_origin=0;
},
I do not see that number though. Later I checked if maybe the Javascript of ExtraLarge HUD (HUD Selector) contains a call for that, but also nothing. I'm a bit puzzled.

Can you give me some pointers regarding how to get that integer?

_________________
DeeperSpace HUD | pleiadian's Oolite GitHub


Top
   
PostPosted: Thu Apr 13, 2017 7:49 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2398
Location: Finland
Variable combatSpeed is from Combat MFD.


Top
   
PostPosted: Thu Apr 13, 2017 9:26 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2263
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Yes, Combat MFD contain the calculations of speed including support for some speed-related addons like TorusToSun. You can make your HUD depending on Combat MFD by placing a requires_oxps block into your mainfest.plist.

_________________
OXPs by Norby


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited