Indroducing Script Triggers?
Posted: 10.02.2005, 17:38
Well, I'm sure everybody will explain me why this is a totally useless proposal, but anyway:
Playing around with ideas for future projects, I've found that being able to set up script triggers could be very helpfull for making addons, educationals or just tour scripts. So what should it be:
In short, a script trigger may be an entry inside a scc, stc or dsc definition section that ties a celx-script to a certain event condition.
An event may be a certain time, a distance, an orbital position or another measurable item out of the definition section (I think mostly usefull will be distance and time). So every time the condition is met during rendering, the script is triggered. Usually those scripts would be very small, just executing one or two tasks.
What could such a script do? Well it could simply change a texture as soon as you approach to a certain distance (this was inspired by the runar sun 'too dim' problem). Our it could tell you that you just crossed the moons orbit, the asteroid belt, the jovian magnetosphere or what else of imaginary boundaries there may be. It could tell you about events just happening now in the solar system: 'Levy/shoemaker to be crashing into jupiter within the next half hour - go and take a look!'.
There are surely much more examples to be imagined. Think alone of flexibility in tour creating when you just write a short script for every possibly visited body and then tie this together with a 'mother script' - or let the user navigate himself. Just let trigger the appropriate script as soon as he is there.
For performance reasons this script triggering would be better switched of as soon as velocity or timerate is too high.
So?
maxim
Playing around with ideas for future projects, I've found that being able to set up script triggers could be very helpfull for making addons, educationals or just tour scripts. So what should it be:
In short, a script trigger may be an entry inside a scc, stc or dsc definition section that ties a celx-script to a certain event condition.
An event may be a certain time, a distance, an orbital position or another measurable item out of the definition section (I think mostly usefull will be distance and time). So every time the condition is met during rendering, the script is triggered. Usually those scripts would be very small, just executing one or two tasks.
What could such a script do? Well it could simply change a texture as soon as you approach to a certain distance (this was inspired by the runar sun 'too dim' problem). Our it could tell you that you just crossed the moons orbit, the asteroid belt, the jovian magnetosphere or what else of imaginary boundaries there may be. It could tell you about events just happening now in the solar system: 'Levy/shoemaker to be crashing into jupiter within the next half hour - go and take a look!'.
There are surely much more examples to be imagined. Think alone of flexibility in tour creating when you just write a short script for every possibly visited body and then tie this together with a 'mother script' - or let the user navigate himself. Just let trigger the appropriate script as soon as he is there.
For performance reasons this script triggering would be better switched of as soon as velocity or timerate is too high.
So?
maxim