ship.maxSpeed is read/write since 1.81, ship.cruiseSpeed is still read-only.
If a script changes ship.maxSpeed, ship.cruiseSpeed stays the same.
Shouldn't it be "automagically" updated to 80% of maxSpeed?
stale ship.cruiseSpeed
Moderators: winston, another_commander, Getafix
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: stale ship.cruiseSpeed
I'd actually appreciate a dev's answer to this as well.
Also, I just recently fell to wondering how, in a script, one might set the player.ship's speed. Is it possible and, if so, Is there a wiki page someone could point me to?
(or is this, perchance, the wrong forum to be asking on?)
Also, I just recently fell to wondering how, in a script, one might set the player.ship's speed. Is it possible and, if so, Is there a wiki page someone could point me to?
(or is this, perchance, the wrong forum to be asking on?)
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- Quite Grand Sub-Admiral
- Posts: 6696
- Joined: Wed Feb 28, 2007 7:54 am
Re: stale ship.cruiseSpeed
It should be possible to set the cruise speed to automatically update to 80% of the max speed when that is changed by script. But if we take this big step, then we might as well take another small one and go all the way to make the cruise speed read/write, which I think is the best solution. It gives full control of the cruise speed to the scripter. Beware though, if we do hand over control of cruise speed to scripts you need to be careful with changing it, since some AIs use it to perform their duties efficiently.
As for changing the player soeed by script, I am not sure this is possible, Could be missing something, though. I've been many times surprised at what scripters can come up with when using the JS API in order to achieve their goals.
As for changing the player soeed by script, I am not sure this is possible, Could be missing something, though. I've been many times surprised at what scripters can come up with when using the JS API in order to achieve their goals.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: stale ship.cruiseSpeed
Ah ok - thanks for elucidating.
IMHO being able to set the ship's speed would be most useful. Nothing terribly ambitious on my part: I merely get tired of having to increase throttle manually to full every time after leaving space-dock. I'd really like to make it go full automatically without the intervention of another prolonged keypress
IMHO being able to set the ship's speed would be most useful. Nothing terribly ambitious on my part: I merely get tired of having to increase throttle manually to full every time after leaving space-dock. I'd really like to make it go full automatically without the intervention of another prolonged keypress
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Redspear
- ---- E L I T E ----
- Posts: 2694
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: stale ship.cruiseSpeed
Meanwhile, changing default cruise speed in ShipEntity.m e.g.
doesn't seem to do anything...
Are alterations required elsewher in order to make it work?
Code: Select all
cruiseSpeed = maxFlightSpeed*0.4f; // was 0.8f
Are alterations required elsewher in order to make it work?