Indroducing Script Triggers?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Indroducing Script Triggers?

Post #1by maxim » 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

jestr
Posts: 612
Joined: 14.09.2003
With us: 21 years 2 months
Location: Bridgwater,UK

Post #2by jestr » 10.02.2005, 17:43

Sounds like a great idea Maxim-how about being able to trigger an event repeatedly every day say or every hour.How about location,trigger takes you to another part of the galaxy when you step on a certain location?Is this possible?Jestr

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 21 years 1 month
Location: Norway

Re: Indroducing Script Triggers?

Post #3by rthorvald » 10.02.2005, 17:45

maxim wrote: 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.

Yes! I want script triggers!
And, as long as i??m wishing for things, a function to loop timed events (an alternative to beginning/ending dates)...

- rthorvald

Topic author
maxim
Posts: 1036
Joined: 13.11.2003
With us: 21 years
Location: N?rnberg, Germany

Post #4by maxim » 10.02.2005, 18:10

jestr wrote:How about location,trigger takes you to another part of the galaxy when you step on a certain location?Is this possible?

You mean something like a dimensional portal? :lol:
Well, from my proposal, if you define a small object, set the trigger to a short distance and write a script that just sets the observers view to a new position somewhere - that should be valid.

maxim

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #5by Cham » 10.02.2005, 18:31

This is a great idea.

Chris ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Return to “Development”