Removing blue rings when ships are spawned
Moderators: winston, another_commander
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Removing blue rings when ships are spawned
When a ship or entity is spawned it generates a blue ring. Is it possible to remove or 'switch off' the blue ring?
Commander Smivs, the friendliest Gourd this side of Riedquat.
Re: Removing blue rings when ships are spawned
You could try the way Eric has posted some time ago -> https://bb.oolite.space/viewtopic.php?f= ... gs#p124781
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Removing blue rings when ships are spawned
Thanks, Svengali...I'll have a look
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Removing blue rings when ships are spawned
The idea to do it that way however, was from Kaks.Svengali wrote:You could try the way Eric has posted some time ago
Best place to look at an example is by looking in the YAH script. Essential the ship is added at a place were rings are not added and than relocated to the entry-point.
When doing it on the
Just checked by dumping time during a jump:
Code: Select all
Player will enter witchspace. At: 180572875975.73105
Player will exit witchspace. At: 180572875975.73105
Player exited witchspace. At: 180572878282.2512
Last edited by Eric Walch on Wed Jun 20, 2012 9:33 am, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Removing blue rings when ships are spawned
I see plenty of rings when adding on shipWillExitWitchspace (though they're almost faded out, so only on objects added in front of the player). Adding on shipWillEnterWitchspace wouldn't give visible rings, I think, but wouldn't it also add to a completely different system?Eric Walch wrote:Just checked by dumping time during a jump:Indeed, time is only updated after the shipWillEnterWitchspace handler. And as rings are only drawn for a few seconds, the rings think their time has already past.Code: Select all
Player will enter witchspace. At: 180572875975.73105 Player will exit witchspace. At: 180572875975.73105 Player exited witchspace. At: 180572878282.2512
Isn't there an issue with those times in that the player (and JS) only gets the displayed time, which may be adjusting, but the rings are displayed on real system time, which is well into the future of that?
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Removing blue rings when ships are spawned
I ment shipWillExitWitchspace in my above message. Will correct now.cim wrote:Adding on shipWillEnterWitchspace wouldn't give visible rings, I think, but wouldn't it also add to a completely different system?
I think the used moment for time update is useful as this allows to add objects that are supposed to be there already on player arrival. (No visible rings)
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Removing blue rings when ships are spawned
The only problem is, this is not an ExitWitchSpace event. I'm actually doing something clever with a ship that seperates into two, so the 'spawning' is done in full view of the player during the game.
I've got the clever bit working well, but can't get rid of the rings yet
I've got the clever bit working well, but can't get rid of the rings yet
Commander Smivs, the friendliest Gourd this side of Riedquat.
- 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:
Re: Removing blue rings when ships are spawned
Don't do it in scanner range of the witchpoint. The wormhole exit rings are not generated anywhere else in the system.Smivs wrote:When a ship or entity is spawned it generates a blue ring. Is it possible to remove or 'switch off' the blue ring?
(By the way: When the JS-ship spawning methods were designed I suggested an additional parameter for generating (or not generating) the rings, which would solve your problem quite easily. It wasn't included, though.)
And if you want to create two other entities (or an additional entity) in the place of another entity, you should use
spawn
anyway.- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Removing blue rings when ships are spawned
Very good point I've just tested after launching and...no ringsCommander McLane wrote:Don't do it in scanner range of the witchpoint. The wormhole exit rings are not generated anywhere else in the system.
It would be ueful, though. Any chance of it being added?Commander McLane wrote:(By the way: When the JS-ship spawning methods were designed I suggested an additional parameter for generating (or not generating) the rings, which would solve your problem quite easily. It wasn't included, though.)
I have been using system.AddShips, because I can't get the ship's orientation correct whn using spawn or spawnOne. Is there a way to do this? I'm currently usingCommander McLane wrote:And if you want to create two other entities (or an additional entity) in the place of another entity, you should usespawn
anyway.
Code: Select all
system.addShips("my_ship_component",1,ship.position.add(ship.vectorForward.multiply(100)),0)[0];
orientation = this.ship.orientation;
Commander Smivs, the friendliest Gourd this side of Riedquat.
Re: Removing blue rings when ships are spawned
I had the reverse problem...I ran across spawn methods that were NOT showing the blue rings when ships spawned in at the witchspace beacon and it was causing me headaches.
These may have changed since I experimented with them circa v1.74 betas:
These may have changed since I experimented with them circa v1.74 betas:
Code: Select all
system.legacy_addShipsAt("trader", 1, "wpu", [Math.random()*0.05-0.025, Math.random()*0.05-0.025, Math.random()*0.05-0.025]); // doesn't trigger "EXITED_WITCHSPACE"
system.legacy_addShipsAt("trader", 1, "wpu", [0, 0, 0]); // doesn't trigger "EXITED_WITCHSPACE"
system.legacy_addShips("trader", 1); // triggers "EXITED_WITCHSPACE"!
- 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:
Re: Removing blue rings when ships are spawned
I was talking about the genuin JS addShips-family of methods, specifically not about the legacy methods. Those are deprecated, it's irrelevant what they do or don't do.Switeck wrote:I had the reverse problem...I ran across spawn methods that were NOT showing the blue rings when ships spawned in at the witchspace beacon and it was causing me headaches.
Re: Removing blue rings when ships are spawned
(That comes across sounding rude, CML.)Commander McLane wrote:I was talking about the genuin JS addShips-family of methods, specifically not about the legacy methods. Those are deprecated, it's irrelevant what they do or don't do.
I am answering the thread poster. Even if the methods I'm describing are depreciated, I figure he'd want to know. It's up to Oolite's maintainers if they want to implement similar functionality in the non-depreciated addShips methods.
A semi-messy workaround of spawning ships elsewhere and them moving them to the witchpoint causes me other problems.
I still get crashes-to-desktop if lots of ships are moved around when I arrive at a new system...but only if my ship is cloaked. I need to test latest daily build to see if that still happens.
(Yep, still crashes...)
Last edited by Switeck on Thu Jun 21, 2012 11:34 pm, edited 1 time in total.
-
- ---- E L I T E ----
- Posts: 1248
- Joined: Sat Sep 12, 2009 11:58 pm
- Location: Essex (mainly industrial and occasionally anarchic)
Re: Removing blue rings when ships are spawned
If I may chip in . .
That state of affairs with the code might explain problems with my Interstellar Tweaks OXP. Perhaps I should turn off the player's cloak before moving - and then, I suppose, I could re-enable it. . .Switeck wrote:I still get crashes-to-desktop if lots of ships are moved around when I arrive at a new system...but only if my ship is cloaked. I need to test latest daily build to see if that still happens.