Getting started with scripting and TS 7.5

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Getting started with scripting and TS 7.5 // Scriptorium

1  |  

Post by seaduck // May 16, 2007, 9:15pm

seaduck
Total Posts: 13
Hi-


Just wondering what's the best way to get started learning the scripting language of TS7.5 and TS in general. I was thinking of making an exporter among other things.


Is the TS7.5 scripting documentation provided with TS7.5 or is it available for download?


Also is a C++ SDK available?


Thanks for any info!


:D

Post by Emma // May 16, 2007, 11:08pm

Emma
Total Posts: 344
pic
1. At first you should get the Dev_Guide that was published with trueSpace 7.1


2. There are two programming languages for scripting, VBScript and jScript So far no C++ SDK available but you can include external routines with calls in VBScript/jScript


3. look inside script published by others in this forum. You will notice skill level is very different among them. Everybody has another point of view, of interests, so there is always something to learn from others


4. do scripting "styled" and "organized", means a nice looking makes it easyer to re-understand what you coded and comments are not only wasted characters. Following sample ( used the # sign in the edit mode of this forum to insert it as code wrap, so the code will be placed in a separate window which includes leading blanks. In normal forum text leading blanks get deleted ) shows what I mean



// initialize game play array with extractions from array PL

for ( j=1; j<77; j++ )

{ s = j*6-6;

f = parseInt(PL.substring( s ,s+3) );

g = parseInt(PL.substring( s+3,s+6) );

v = PL.substring(s+3,s+4);

e = (g) + (f);

e = (e*e) / e;

d = e + (f);

a = d + e ;

b = d + 2 * e;

c = d + 3 * e;



// move the chain of extractions around in right order after j is finished with every 27th run

if (j >28 )

{ if (j<53)

{

e=d; d=b; b=a; a=c; c=b; b=e;

}

}

ROW[sar] = a; ROW[sar+1] = b; ROW[sar+2] = c; ROW[sar+3] = d;

sar = sar +4;

}

System.Alert(sar+" - "+ROW); // -- only for testing the code, show what ROW contains now


5. Software is usually written in revisions or releases, means organize a folder tree for growing steps of developing, comment the stage differences. This helps when realizing after several steps that you are on the wrong way to get back and then go into another direction.


6. Build yourself a collection of short samples, at least as long as there is not such collection available here in the forum


Oh yes, before I forget, there is a tutorial section in this forum, write tutorials yourself, that makes it necessary that you yourself think about what you did and why (you think) it works :D


in this sense, welcome to the party :jumpy:

Post by seaduck // May 17, 2007, 10:28am

seaduck
Total Posts: 13
Thanks for the help! :)
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn