Here is an alternate method (probably a lot faster) way to solve the problem as long as you can get and apply the right vert quantity in code while constructing the program.
It was my understanding that the "handle" would not change once program started but it could be different with each exectution.Thus the original problem.
However - I would swear ,not sure though, that I saw it change once during executuin.Anyone know about this for sure.
Anyway - I plan on using both solutions at the same time just as a fail safe.
;;Due before Main Loop
sur1=GetSurface (f,1)
sur2=GetSurface (f,2)
sur3=GetSurface (f,3)
turf(1,1)=CountVertices(sur1)
turf(2,1)=CountVertices(sur2)
turf(3,1)=CountVertices(sur3)
;;Do in main loop when surface hit is needed
whatsurface=PickedSurface():surfacehit=0
vertnumb=CountVertices(whatsurface)
If vertnumb =1159 Then surfacehit=1
If vertnumb =4203 Then surfacehit=2
If vertnumb =8878 Then surfacehit=3
It was my understanding that the "handle" would not change once program started but it could be different with each exectution.Thus the original problem.
However - I would swear ,not sure though, that I saw it change once during executuin.Anyone know about this for sure.
Anyway - I plan on using both solutions at the same time just as a fail safe.
;;Due before Main Loop
sur1=GetSurface (f,1)
sur2=GetSurface (f,2)
sur3=GetSurface (f,3)
turf(1,1)=CountVertices(sur1)
turf(2,1)=CountVertices(sur2)
turf(3,1)=CountVertices(sur3)
;;Do in main loop when surface hit is needed
whatsurface=PickedSurface():surfacehit=0
vertnumb=CountVertices(whatsurface)
If vertnumb =1159 Then surfacehit=1
If vertnumb =4203 Then surfacehit=2
If vertnumb =8878 Then surfacehit=3