Progress
Moderators: winston, another_commander
- 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:
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Nöt any möre, as Inspector Clouseau would say.Commander McLane wrote:…while the target inspector shows them having a speed of 0.
E-mail: [email protected]
-
- Quite Grand Sub-Admiral
- Posts: 6811
- Joined: Wed Feb 28, 2007 7:54 am
HUD is now switchable on-the-fly by scripts. The new JS method property to do this is
player.ship.switchHudTo("myFunkyHud.plist");
Edit: Post-SVN3062, the switchHudTo method has been replaced with the read/write JS property player.ship.hud.
Code: Select all
player.ship.hud = "myFunkyHud.plist";
Last edited by another_commander on Sun Mar 14, 2010 10:07 pm, edited 1 time in total.
- Killer Wolf
- ---- E L I T E ----
- Posts: 2296
- Joined: Tue Jan 02, 2007 12:38 pm
-
- Quite Grand Sub-Admiral
- Posts: 6811
- Joined: Wed Feb 28, 2007 7:54 am
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Oh, now that's cool!another_commander wrote:Any of the JavaScript event handlers can be used to switch the HUD and yes, both of your suggestions will be possible.Killer Wolf wrote:ooooh...what's the triggers? could we switch to a damaged HUD, if some equipment was damaged, eg? or swap to a trading HUD when docked?
How quickly could HUDs be switched and how often? I'm just thinking of the possibility of using HUD switching to create the effect of say flickering power supplies and lighting (For example Deepspace's excellent 3D projection looking scanner).
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
-
- Quite Grand Sub-Admiral
- Posts: 6811
- Joined: Wed Feb 28, 2007 7:54 am
I'm afraid the timers don't run that fast. The minimum timer interval is hardcoded to 0.25 seconds, which means you can at maximum switch hud four times in a second. Not fast enough to create the illusion of movement, unfortunately.DaddyHoggy wrote:How quickly could HUDs be switched and how often? I'm just thinking of the possibility of using HUD switching to create the effect of say flickering power supplies and lighting (For example Deepspace's excellent 3D projection looking scanner).
-
- Quite Grand Sub-Admiral
- Posts: 6811
- Joined: Wed Feb 28, 2007 7:54 am
Which is fine, because we can do that with JavaScript too:lfnfan wrote:even without flickering, simply losing the hud from view entirely for a second or two should give the feeling of being in a fight and taking damage to systems / losing power?
edit; but I guess that's more 'switching off the hud' rather than 'switching the hud'.... Hm
Code: Select all
player.ship.hudHidden = true/false;

coo-el
random brief on/off's when power gets below a certain level, more prolonged off's when it's nearly time to reach for the exit (or the GHD (not the hair straighteners)).
I'd buy that .oxp
maybe even lose any pre-set targets in the multi-targeting computer... although that's making life a little harder at precisely the wrong time
One for the sci-fi trivia thread: Who made use of an 'artificial injury generator' in a well-known 1970s/80s sci-fi series?
random brief on/off's when power gets below a certain level, more prolonged off's when it's nearly time to reach for the exit (or the GHD (not the hair straighteners)).
I'd buy that .oxp

maybe even lose any pre-set targets in the multi-targeting computer... although that's making life a little harder at precisely the wrong time

One for the sci-fi trivia thread: Who made use of an 'artificial injury generator' in a well-known 1970s/80s sci-fi series?
You don't need much flicker, all you'd need is 3 hud images, a standard one for good condition, a really faded out one, and a middle faded one. Switch from the main to the middle when power is low, and occasionally switch to the really faded one when power is very low (could be randomised).
Ok, so each flicker lasts no more than 1/4 second, but it's enough to count.
Plus you could have a standard hud, and a red-alert hud.
Ok, so each flicker lasts no more than 1/4 second, but it's enough to count.
Plus you could have a standard hud, and a red-alert hud.
Commander Monty, a Python Class Cruiser driver 
Iron assed bulk haulers for the win!
Of the two trumbles which escaped today from Lave station, only 473 have been located....

Iron assed bulk haulers for the win!
Of the two trumbles which escaped today from Lave station, only 473 have been located....
-
- Quite Grand Sub-Admiral
- Posts: 6811
- Joined: Wed Feb 28, 2007 7:54 am
I have made a small video using a modified Oolite binary that allows timer intervals as short as 0.03125 seconds. What is shown therein is the two HUDs of the main game (standard and small) switching between each other as soon as cloak has been activated. It gives a pretty good impression of a malfunctioning hud, I think. However, I am not sure what side effects these very short timers might have with the rest of the game and if we could possibly make the minimum intervals this short or not - I have not noticed any issues, but haven't checked thoroughly. But I think this gives a pretty good idea of what the switching effect could look like.
Last edited by another_commander on Fri Mar 12, 2010 7:25 am, edited 1 time in total.
-
- Quite Grand Sub-Admiral
- Posts: 6811
- Joined: Wed Feb 28, 2007 7:54 am
New autopilot features: The autopilot code has been decoupled from the docking computers control one and scripts have been granted access to it. What this means, is that scripts now can start up autopilot to specified stations and they can also stop it. Scripts are responsible for checking for the existence of docking computers when calling the autopilot, if so required. What this, in turn, means is that autopilot can be engaged and disengaged by scripts even if the player does not have the Docking Computers installed. The two methods for this are player.ship.engageAutopilotToStation, which takes as parameter the station we are telling the autopilot to dock us with and player.ship.disengageAutopilot, without parameters. Example of usage:
If no valid station entity is specified for docking with (e.g. trying to script-dock with a police Viper), an error will be reported in the log.
Additionally, the playerStartedAutoPilot event handler now takes as argument the station we are trying to dock to:
Code: Select all
player.ship.engageAutopilotToStation(system.mainStation);
player.ship.disengageAutopilot();
Additionally, the playerStartedAutoPilot event handler now takes as argument the station we are trying to dock to:
Code: Select all
this.playerStartedAutoPilot = function(stationToDockTo)
{
log("playerStartedAutoPilot", "Player has initiated autopilot sequence to " + stationToDockTo);
}