Okay, hereis what I have done so far:
Do While Not EOF(1)
' Read line into variable.
TCOLOR$ = LineInput(1)
x$ = LineInput(1)
y$ = LineInput(1)
If TCOLOR$ = "BLUE" Then
'add a light to the collection
TempLight = OneBlueLight.Clone
NewX = Val(x$) + 0.4
NewY = Val(y$)
TempLight.Transparency() = Basic3D.TransparencyFlag.DrawSecondAlphaBlend 'or 3 if that doesn't work
TempLight.Emissive = BlueColor
TempLight.Position(NewX, 0, NewY)
NewAngle = AngleToCenter(NewX, NewY) + 180
TempLight.Rotate(0, NewAngle, 0)
'rotate to face 0,0,0
BlueLights.Add(TempLight)
BLIGHTCOUNT = BLIGHTCOUNT + 1
End If
If TCOLOR$ = "RED" Then
TempLight = OneREdLight.Clone
NewX = Val(x$) + 0.4
NewY = Val(y$) - 0.3
TempLight.Transparency() = Basic3D.TransparencyFlag.DrawSecondAlphaBlend 'or 3 if that doesn't work
TempLight.Emissive() = RedColor
TempLight.Position(NewX, 0, NewY)
NewAngle = AngleToCenter(NewX, NewY) + 180
TempLight.Rotate(0, NewAngle, 0)
'rotate to face 0,0,0
RedLights.Add(TempLight)
RLIGHTCOUNT = RLIGHTCOUNT + 1
End If
If TCOLOR$ = "WHITE" Then
TempLight = OneWhiteLight.Clone
NewX = Val(x$) + 0.4
NewY = Val(y$) - 0.3
TempLight.Position(NewX, 0, NewY)
TempLight.Transparency() = Basic3D.TransparencyFlag.DrawSecondAlphaBlend 'or 3 if that doesn't work
TempLight.Emissive() = WhiteColor
NewAngle = AngleToCenter(NewX, NewY) + 180
TempLight.Rotate(0, NewAngle, 0)
'rotate to face 0,0,0
WhiteLights.Add(TempLight)
WLIGHTCOUNT = WLIGHTCOUNT + 1
End If
Loop
The cloning is working, but what isn't working is assigning the new X/Y coordinates to the 3d objects. The X/Y values are remaining 0/0 for all of the cloned objects. It appears the ..Position() code is not working at all. The .Transparency and .Emmissive values are being stored, just not the new coordinates.