custom script loaded in every single scene
6 posts • Page 1 of 1
custom script loaded in every single scene
hi there
i wondered if it is possible to create a .txt into the algodoo folder and write some scripts in it that and algodoo should load it into ANY scene you open
so the console is like "open \bla\my.txt" any loading process
and the .txt is like "print: <all my scripts included here>"
the practical sense of this is for EXAMPLE:
could be included into every scene and if i want a rounded number i didnt have to write the script down everytime
my question: is there the possibility?
maybe in the algodoo config?
or maybe algodoo just cant open it ?
well i dont know thats why im asking here
i wondered if it is possible to create a .txt into the algodoo folder and write some scripts in it that and algodoo should load it into ANY scene you open
so the console is like "open \bla\my.txt" any loading process
and the .txt is like "print: <all my scripts included here>"
the practical sense of this is for EXAMPLE:
- Code: Select all
scene.my.round=(x)=>{x>(math.toint(x)+0.4999)?{x2=(math.toint(x)+1)}:{x2=math.toint(x)}}
could be included into every scene and if i want a rounded number i didnt have to write the script down everytime
my question: is there the possibility?
maybe in the algodoo config?
or maybe algodoo just cant open it ?
well i dont know thats why im asking here
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: custom script loaded in every single scene
I'm pretty sure you can do that in the config file, but only the one in your documents. I don't know exactly where to put it, but I don't think it matters much.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: custom script loaded in every single scene
works
into the "autoexec.cfg"
i included my rounding function:
now it can be used in every scene automatically after starting algodoo
into the "autoexec.cfg"
i included my rounding function:
- Code: Select all
exit = {System.exit};
quit = {System.exit};
print = {Console.print};
roundmy = {scene.my.roundmy=(x)=>{x>(math.toint(x)+0.4999)?{x2=(math.toint(x)+1)}:{x2=math.toint(x)}}};
time = {Sim.time};
sin = {math.sin};
cos = {math.cos};
now it can be used in every scene automatically after starting algodoo
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: custom script loaded in every single scene
one last thing: could there appear any problems with writing down something into the config??
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
Re: custom script loaded in every single scene
Not at all. People do it all the time. The config is the best (and I think only) way to do this, and people have done it since Phun was around.
Also, you should really edit your posts instead of posting twice.
Also, you should really edit your posts instead of posting twice.
TheWinkits wrote:They both looks of cuking amazing
-

Chronos - [Most Active Member 2010]
- Posts: 4457
- Joined: Mon Aug 31, 2009 6:00 pm
- Location: Californania
Re: custom script loaded in every single scene
sorry. forgot it
ok im done,thanks for your help

ok im done,thanks for your help
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
- hiltropper
- Posts: 85
- Joined: Mon Dec 20, 2010 12:02 pm
- Location: Germany
6 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest



