Setvisible

All about writing scripts for Celestia in Lua and the .cel system
Topic author
BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 3 months

Setvisible

Post #1by BobHegwood » 14.08.2008, 18:33

Pardon, but could someone please explain how to get around the Setvisible property (which is included in the latest releases of Celestia)
with a possible workaround for use in Celestia 1.5.1 final? I realize that this is not a large issue, but I would very much like to make some
add-ons available to those who do not yet use the 1.6 pre-release versions. Any help here?

Thanks, Brain-Dead
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 4 months
Location: NY, USA

Re: Setvisible

Post #2by selden » 14.08.2008, 19:09

In v1.5.0 or later, one could call setradius with an invisibly small value. I've never used this, but Cham used it in one of his posted scripts. I don't know if the model and its textures are loaded when the radius is too small to see. That would be easy enough to test, but I've never taken the time.

I use a ScriptedOrbit declaration which places the object at a very large distance away from its default position when it's not supposed to be seen and at [0 0 0] when it is supposed to be visible. The object's model and textures are not loaded unless its position is set to [0 0 0].
Selden

Topic author
BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 3 months

Re: Setvisible

Post #3by BobHegwood » 14.08.2008, 19:12

selden wrote:In v1.5.0 or later, one could call setradius with an invisibly small value. I've never used this, but Cham used it in one of his posted scripts. I don't know if the model and its textures are loaded when the radius is too small to see. That would be easy enough to test, but I've never taken the time.

I use a ScriptedOrbit declaration which places the object at a very large distance away from its default position when it's not supposed to be seen and at [0 0 0] when it is supposed to be visible. The object's model and textures are not loaded unless its position is set to [0 0 0].

Okay, thanks very much Selden.
Will play with it for a while to see if I can achieve what I want here.
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN


Return to “Scripting”