Scripting feature request: run at start

Forum dedicated to INDIGO Script know-how exchange
Post Reply
User avatar
aaron
Posts: 114
Joined: Thu Apr 09, 2020 11:47 pm
Location: Upstate New York, US
Contact:

Scripting feature request: run at start

Post by aaron »

Scripting is huge potential.

I think most scripts, at least the examples posted, are designed to stay persistent in memory and be driven by events. So what’s the best way to start these scripts? Ironically, I think we need to start the scripts manually.

There is an “on load” script, but it is not very scalable.

Instead, can we have a property for each script so it is executed at server boot? Please have these execute towards the end of the startup sequence, after other agents and drivers load. That will make scripting easier for new users.

Also, I’ve found that it is very easy to write scripts that break the server! Having scripts run at startup will make this a more serious problem. Is there some way the server can monitor scripts and kill them if they begin to generate large numbers of errors?
User avatar
Peter Polakovic
Posts: 2742
Joined: Thu Apr 21, 2016 9:38 am

Re: Scripting feature request: run at start

Post by Peter Polakovic »

Instead, can we have a property for each script so it is executed at server boot? Please have these execute towards the end of the startup sequence, after other agents and drivers load. That will make scripting easier for new users.
Yes, I feel this is a weakness of used approach. For now my idea is, that instead of having on_load and on_unload scripts, every script will have an option to be executed on load, on unload or manually.
Also, I’ve found that it is very easy to write scripts that break the server! Having scripts run at startup will make this a more serious problem. Is there some way the server can monitor scripts and kill them if they begin to generate large numbers of errors?
It is not so easy, but used engine has billions of debugging features. I believe we'll find some way how to stop running script.

Peter
User avatar
Peter Polakovic
Posts: 2742
Joined: Thu Apr 21, 2016 9:38 am

Re: Scripting feature request: run at start

Post by Peter Polakovic »

Instead, can we have a property for each script so it is executed at server boot? Please have these execute towards the end of the startup sequence, after other agents and drivers load. That will make scripting easier for new users.
This is how it will work in the next build...

Screenshot 2021-01-05 at 19.29.54.jpg
Screenshot 2021-01-05 at 19.29.54.jpg (197 KiB) Viewed 354 times
Post Reply