TS7 Script help request (simple)

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.

TS7 Script help request (simple) // Archive: Tech Forum

1  |  

Post by parantaja // Jan 31, 2006, 9:08am

parantaja
Total Posts: 5
I have to confess - I've looked at script writing and it looks like Greek to me. (This is a repost from the old forums.)


I've tried the record functions with no success.


What I'm trying to do is probably simple - add a number of cubes to a scene (resolution 1) with predefined x,y,z coordinates. I would also like to specify their color and dimensions. Can anyone help? I've searched the forums and haven't found anything that helps.

Post by peterma // Feb 1, 2006, 4:31am

peterma
Total Posts: 48
As for the macro record, did you try both tutorials from chapter 2.14 in docs ? They should work ok and you can explore some recorded scripts then.

As for your cube creator, perhaps you can start with existing script demos located in Activities / MyActivities library (Make Crystal, Make Tree).

Also when you start macro recorder with empty scene and add / position some cubes from the objects library, the recorded script could give you a clue.


Come on guys, can't wait to see some cool scripts :)

Situation should become better when DG chapers will be avaliable as well.

Post by parantaja // Feb 1, 2006, 10:24am

parantaja
Total Posts: 5
I have tried using both JScript and VBScript macro recorders.


I set the cube resolution to 1 and start recording. I add the cube to the scene, resize it, and change it's color. When I stop recording and examine the script, I get the following:


Sub Execute(params)

' Macro captured 02/01/06 14:42:44


End Sub


This happens with both JScript and VBScript.


Correct me if I'm wrong, but it doesn't seem to be recording anything.


To be more specific, in my latest attempt, I created the cube, changed size to 3*3*2, moved to 1.785, 1.561, 0.813, and changed the color to 255R, 30G, 30B. Still produced an apparently empty script.

Post by Asem // Feb 1, 2006, 11:06am

Asem
Total Posts: 255
When you start recording the macro in either vbscript or jscript you need to doing the movements, scaling anything withen the player view or it won't record anything.

Post by TomG // Feb 1, 2006, 11:43am

TomG
Total Posts: 3397
Yes, this records Player activity - movement and scaling etc in the Model view won't show. I believe LE changes, eg entering new values, might be recorded - but never tested or explored it :)


HTH!

Tom

Post by parantaja // Feb 1, 2006, 4:01pm

parantaja
Total Posts: 5
Well, I feel a bit silly now, but I appreciate the help. Everything's working perfectly now. Thanks, everyone!
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