text display problems (was: Unexpected behaviour in Scripts)
Posted: 26.10.2005, 18:32
Does anyone else find that if they run scripts a lot then things sometimes randomly don't turn out the way you want, but then if you close Celestia down and reopen it again and run the same script it works perfectly?
Also, I'm finding that if I have several flash statements, they don't all show if I end one of them with a duration. But it does work if you separate the duration into a wait command. e.g.
Shows both the target type for 3 seconds and prints "test".
But:
Just shows "test". If however I remove the celestia:flash("test") line, it shows the target type on the screen for 3 seconds.
Am I doing something wrong here, or is this a bug in the API itself? Or should you just always use wait statements instead of putting the duration in the flash statement itself?
Also, I'm finding that if I have several flash statements, they don't all show if I end one of them with a duration. But it does work if you separate the duration into a wait command. e.g.
Code: Select all
planet = celestia:getselection()
type = planet:type()
celestia:flash("target is a "..type)
wait(3)
celestia:flash("test")
Shows both the target type for 3 seconds and prints "test".
But:
Code: Select all
planet = celestia:getselection()
type = planet:type()
celestia:flash("target is a "..type, 3)
celestia:flash("test")
Just shows "test". If however I remove the celestia:flash("test") line, it shows the target type on the screen for 3 seconds.
Am I doing something wrong here, or is this a bug in the API itself? Or should you just always use wait statements instead of putting the duration in the flash statement itself?