Game Development Community

Is TSTPro scriptable?

by Tom Spilman · in Artist Corner · 04/11/2006 (1:19 am) · 5 replies

Looking at the demo (no i haven't bought it yet) it seems like TSTPro is sort of scriptable, but i'd like to know to what extent.

Can i exec() an my own script file from within TSTPro?

Can i change the current sequence and set the animation time in script?

Can i change the camera angle in script?

Are any of the script functions of TSTPro documented?

Thanks!

About the author

Tom is a programmer and co-owner of Sickhead Games, LLC.


#1
04/15/2006 (1:27 am)
Bump! =)
#2
04/15/2006 (2:34 am)
Quote:Are any of the script functions of TSTPro documented?
Nope... so, the others get a bit difficult to answer...


Pretty sure you can exec() stuff though, just try it your self, open up the console with the ~ button.
Let us know if you find out anything useful.
#3
05/24/2006 (3:07 pm)
Greetings!

Tom it certainly is possible to do an exec() from the console just as with any other TGE 1.2/1.3 app. I'd expect you'd even be able to tie it to a key by defining an action map.

None of the script functions are publicly documented but if you let me know what you're after I'll let you know how to do it.

From your questions above:

Rotate Camera
This is done relatively with
objectViewerGUI.setRotate(0, x, y);
where x and y are fractional steps to rotate in. The formula is:
relative rotation in degrees = x * 0.01
and the same for y.

Change Current Sequence
You can do this with:
objectViewerGUI.setCurrentSequence(0, sequenceNum);
where sequenceNum is the 0-based number of the sequence to play. To find the order of the loaded sequences, check the Sequence Info window.

Change Animation Time
To play a sequence use:
objectViewerGUI.setSeqPlay(1);
and to stop the sequence:
objectViewerGUI.setSeqPlay(0);
But I assume you mean change the sequence's current position? To change it to a position of 0.75:
TWSequenceTimeSlider.setValue(0.75);

As you can tell I hadn't set up any easy shortcuts to mod TST Pro. I hadn't given the thought of modding TST Pro at all actually. If there is something you or others are interested in just let me know. Maybe I can expand the script functions for the next release.

- LightWave Dave
#4
05/24/2006 (3:22 pm)
Does setRotate set the actual angle, or does it "rotate by x, y"? (I'm about to go to bed which is why I ask instead of just TRYING it. Sorry =).

The reason I ask though is that there's one thing I've been missing, the ability to set up the camera angle based on a preset (a save/load camera function would be even nicer =). Right now it's a bit of a pain to easily compare two versions of a model when there's no way to set the camera up exactly the same.
#5
10/12/2006 (1:31 am)
I would love to have an option to save and load model lists, including mounted shapes. When you are working with large collections of items it is a pain to open them up and set up them all every time you need to quit and reopen the show tool.

thank you in advance.