Ok, the following is two code blogs that have the problem. The first is the other Form's Buttons ClickEvent procedure, and is suppose to set certain perameters up and move a particular model to a certain position.
Private Sub cmdKickPlay_Click()
byteOFFPlaySelect = 6
byteOFFFormation = 12
Unload OFFSelection
GameForm.cmdOFFCall.Enabled = False
GameForm.cmdDEFCall.Enabled = True
'Following code used to setup 3/4pt Feildgoals in Truevision
If byte3or4ptFeildGoalInitiatior = True Then
If intTeam = 1 And intFeildpos > 60 And byte3or4ptFeildGoalIndicator = 1 Then
intTogo = intTogo + (intFeildpos - 60)
intFeildpos = 60
intBallon = (100 - intFeildpos)
GameForm.lblOffDef.Caption = "DEF"
GameForm.lblSpot.Caption = intBallon
GameForm.picPossession.Picture = LoadPicture(App.Path + "..\Misc Art\HomePOS.bmp")
sngLineOfScrimagePosition = (-20.95 * intFeildpos)
GameForm.lblToGo.Caption = intTogo
End If
If intTeam = 2 And intFeildpos < 40 And byte3or4ptFeildGoalIndicator = 1 Then
intTogo = intTogo + (40 - intFeildpos)
intFeildpos = 40
intBallon = intFeildpos
GameForm.lblOffDef.Caption = "DEF"
GameForm.lblSpot.Caption = intBallon
GameForm.picPossession.Picture = LoadPicture(App.Path + "..\Misc Art\GuestPOS.bmp")
sngLineOfScrimagePosition = (-20.95 * intFeildpos)
GameForm.lblToGo.Caption = intTogo
End If
byte3or4ptFeildGoalInitiatior = False
End If
End Sub
The important part of this code (at least I think it is) is the "sngLineOfScrimagePositioin" varible where it gets its new data (sngLineOfScrimagePosition = (20.95 * intfeildpos). When the user clicks the command button on the other form, I want the new data to be sent to this Varible then the Varible is read in the program Main Loop. The following code is the Main Loop code...
Private Sub Main_loop()
Do
DoEvents
If PanControlUp = True Then
sngPositionY = sngPositionY + (TV8.TimeElapsed / 5)
camera.SetPosition sngPositionX, sngPositionY, sngPositionZ
End If
If PanControlDown = True Then
sngPositionY = sngPositionY - (TV8.TimeElapsed / 5)
camera.SetPosition sngPositionX, sngPositionY, sngPositionZ
End If
If ZoomControlIn = True Then
sngPositionZ = sngPositionZ - (TV8.TimeElapsed / 2)
camera.SetPosition sngPositionX, sngPositionY, sngPositionZ
End If
If ZoomControlOut = True Then
sngPositionZ = sngPositionZ + (TV8.TimeElapsed / 2)
camera.SetPosition sngPositionX, sngPositionY, sngPositionZ
End If
If PanControlLeft = True Then
sngPositionX = sngPositionX + (TV8.TimeElapsed / 2)
camera.SetPosition sngPositionX, sngPositionY, sngPositionZ
End If
If PanControlRight = True Then
sngPositionX = sngPositionX - (TV8.TimeElapsed / 2)
camera.SetPosition sngPositionX, sngPositionY, sngPositionZ
End If
ChainScrimage(1).SetPosition 605, 25, sngLineOfScrimagePosition
ChainScrimage(2).SetPosition -607, 25, sngLineOfScrimagePosition
LineOfScrimage.SetPosition 0, 0, sngLineOfScrimagePosition
TV8.Clear
scene.RenderAllMeshes
'---------
TV8.RenderToScreen
Label10.Caption = sngLineOfScrimagePosition
Loop Until DoLoop = False
Main_quit
End Sub
As you can see with the following line (LineOfScrimage.SetPosition 0, 0, sngLineOfScrimagePosition) the new data should change the Varible to the new setting then the program Main Loop would adjust the position of the model to the new position. This would easily work with just a simple Command Button on the same form as the Truevision Program, but for some reason the new data is most likely not being updated to the new varible by clicking the Command Bottom on the other form. I know this because the line of code (Label10.Caption = sngLineOfScrimagePosition) is linked to a label on the Main Form that shows the varible is not updating.