Maybe it's my fault but I can't find any clue how to do it.
I want to switch off an add-on (make it invisible), when I'm inside of the Milky Way.
Is it possible?
How to make an active add-on switch off when I'm inside of the Milky Way, but switch on, when I'm outside of it?
How to make an active add-on switch off based on my location?
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
- SevenSpheres
- Moderator
- Posts: 822
- Joined: 08.10.2019
- With us: 4 years 10 months
You can use a celx script to toggle an object's visibility, like this:
You might be able to set it up so visibility depends on whether you're in the Milky Way. Try the celx scripting guides on Wikibooks.
Code: Select all
if not celestia:find("MW"):visible() then
celestia:find("MW"):setvisible(true)
elseif celestia:find("MW"):visible() then
celestia:find("MW"):setvisible(false)
end
You might be able to set it up so visibility depends on whether you're in the Milky Way. Try the celx scripting guides on Wikibooks.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED