Array pipeline is possible

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.

Array pipeline is possible // Scriptorium

1  |  

Post by Wigand // May 25, 2007, 8:14am

Wigand
Total Posts: 462
pic
Finally it is possible to pass an array from one Script Object to an other

' OnComputeOutputs

' Called to compute values of all output connectors

Sub OnComputeOutputs(params)

Dim var1, var2, var3, array

var1 = params.ConValue("var1")

var2 = params.ConValue("var2")

var3 = params.ConValue("var3")


' TODO: put your computation here


Set array = System.CreateDO("Common Data Package/Int Array Data")



array.Add(var1)

array.Add(var2)

array.Add(var3)


params.ConValue("array") = array

End Sub





' OnComputeOutputs

' Called to compute values of all output connectors

Sub OnComputeOutputs(params)

Dim array, var1, var2, var3

Set array = params.ConValue("array")


' TODO: put your computation here



params.ConValue("var1") = array.GetAt(0)

params.ConValue("var2") = array.GetAt(1)

params.ConValue("var3") = array.GetAt(2)


End Sub

Post by trueBlue // May 25, 2007, 10:27am

trueBlue
Total Posts: 1761
pic
Yes lots of changes to Scripting in tS7.5. Have you noticed the jScript Function Set and VB Function Set in the System - Scripts library?

Post by Wigand // May 26, 2007, 1:28am

Wigand
Total Posts: 462
pic
Yes, but not tested. Is it for global variables and function or how it it used?
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