Or put the script in:
..Realsoft3D/scripts/js
and use
load ("test.js");
Thanks to Timo again.
Matthias
----- Original Message -----
From: "Matthias Kappenberg" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, December 30, 2007 11:19 AM
Subject: Re: Javascript, one more math function
> Many thanks, Timo :-)
>
> for thoose who need it, too:
>
> create a folder, let's say "javascript"
> the structure should be like:
>
> ../Realsoft3D/scripts/javascript
>
> create a file "test.js"
>
> type in "Object->Properties->Script tab" something like:
>
> load ("scripts/javascript/test.js");
>
> (Load path is relative to RS path)
>
> Matthias
>
> (My love to the Halflings leaf ....;-)
>
> ----- Original Message -----
> From: "Timo Mikkolainen" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Sunday, December 30, 2007 12:33 AM
> Subject: Re: Javascript, one more math function
>
>
> > Use load instead of include, it reloads every time. Include is done
> > only once (i.e. it won't reload if you run the script again).
> >
> > On 30/12/2007, Matthias Kappenberg <[EMAIL PROTECTED]> wrote:
> > > My favourite (used most often the good old print):
> > >
> > > // script begin
> > > var a = 1;
> > > var b = 2;
> > >
> > > print ("My first variable: "+a+"\n"+
> > > "var b on next line: "+b+"\n"+
> > > " and Pi is: "+Math.PI
> > > );
> > > // script end
> > >
> > > Textstrings in ""
> > > a + to add the next parts, maybe a variable
> > > and \n for linebreaks...
> > > Maybe somebody likes it, too ;-)
> > >
> > > But why is the "include" not working in all circumstances :-?
> > > Would be really great to work in external Editors, while
> > > checking the result in RS in play-animation-loop :-)
> > > The advance would be, too, if a bad script
> > > crashes RS, the script is not lost in total :-?
> > > And external Editors have syntax-highlighting...
> > > No more copy and paste...
> > > Reuse of scripts would be easier, too.
> > >
> > > Matthias
> > >
> > >
> > > > Matthias,
> > > > lol, Thankz for the explain, but what happened is that I tried to insert
> > > > the greek letter but it did not make it through the encoding; thus the
> > > > "?" : D
> > > > I use it much and just did not want it to be left out of the list.
> > > >
> > > > Also, from fre-ber is some more handy math stuuf from the site you
> > > > linked earlier:
> > > >
> > > > http://www.javascripter.net/faq/arithmet.htm#top
> > > >
> > > > Cheerz,
> > > > Zaug
> > > >
> > >
> >
>