Position in Loop

Discussions concerning programming of SOFTIMAGE©
Post Reply
Falam

Position in Loop

Post by Falam » 13 Jun 2013, 15:48

How come the Cube doesn't get moved 6 units in X, in the loop. Can I not place a loop within a function ?

JScript

Code: Select all

function ch() {
for (var i=1; i<=6; i++) {
t=6
oNull = GetPrim ("Null","myNull")
oCube = GetPrim ("cube","thecube")
oNull = GetPrim ("cone","conehead")
oCube&&".kine.local.posx",t
LogMessage (oNull)
}

		}
ch()

Code: Select all

GetPrimCamera( PresetObj, [Name], [Parent], [Primitive], [3DObjCamera], [3DObjCameraInterest]
What is 3DobjCamera, couldn't quite understand it in the SDK ?

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: Position in Loop

Post by xsisupport » 13 Jun 2013, 16:11

You are basically doing this each time through the for loop:

Code: Select all

t=6
"thecube.kine.local.posx",t
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

Falam

Re: Position in Loop

Post by Falam » 13 Jun 2013, 23:43

How come I can't get the variable, maybe I'll figure it out, I'll leave the question open :)
Thanks Stephen :)

Edit: I Solved it.

Again, Thank Stephen :)

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests