How to choose the observer in a celx
Posted: 17.05.2005, 16:56
Hi,
Could someone tell me how to choose the observer's window in a celx script ? I need to insert two cel scripts in a celx script, each one for a specific view.
For instance, in the celx script below, I want to have two specific views of earth. I managed to split the screen and apply my first cel script to the second view, but I don't know how to select the first view for the other cel script...
I can (try to) explain it again if that's not clear enough...
-- define one single view
celestia:getobserver():singleview()
observers = celestia:getobservers()
-- split the view horizontaly
observers[1]:splitview("h", 0.5)
wait(0.5)
-- define the cel script to apply in the second view
function CEL(source)
local script = celestia:createcelscript(source)
while script:tick() do
wait(0)
end
end
CEL([[
{
select { object "Sol/Earth" }
follow {}
goto { time 5 distance 5 }
wait { duration 5 }
}
]])
-- I want to define here the cel script to apply in the other view
-- ...
Thanks a lot for any help
PS : Sorry, this topic has to be moved in the script forum...
Could someone tell me how to choose the observer's window in a celx script ? I need to insert two cel scripts in a celx script, each one for a specific view.
For instance, in the celx script below, I want to have two specific views of earth. I managed to split the screen and apply my first cel script to the second view, but I don't know how to select the first view for the other cel script...
I can (try to) explain it again if that's not clear enough...
-- define one single view
celestia:getobserver():singleview()
observers = celestia:getobservers()
-- split the view horizontaly
observers[1]:splitview("h", 0.5)
wait(0.5)
-- define the cel script to apply in the second view
function CEL(source)
local script = celestia:createcelscript(source)
while script:tick() do
wait(0)
end
end
CEL([[
{
select { object "Sol/Earth" }
follow {}
goto { time 5 distance 5 }
wait { duration 5 }
}
]])
-- I want to define here the cel script to apply in the other view
-- ...
Thanks a lot for any help
PS : Sorry, this topic has to be moved in the script forum...