Could someone please explain to me why I can't seem to delete the mesh under the label .c1 in this code? I made it just to use as CopyMesh template, but now that I'm done, I can't seem to get rid of it! This is also happening less noticably throughout this example. If you look close, you can see some of the - supposed to be - alpha .25 meshes are actually at double what they should be, which is funny because why would something I made a copy of ever be affected by an alpha change made to it's copy?! I mean you delete the original, and then not only is it still there, but it's being affected by commands too? Help!! :)
Graphics3D 640,480,32,1 SetBuffer BackBuffer() Global camera=CreateCamera() PositionEntity camera,5,10,-20 RotateEntity camera,27.5,12.5,0 CameraZoom camera,1.6 Global horizontalbar0=CreateCube() ScaleMesh horizontalbar0,50,.05,.05 Global horizontalbar1=CopyMesh(horizontalbar0) Global horizontalbar2=CopyMesh(horizontalbar0) Global horizontalbar3=CopyMesh(horizontalbar0) Global horizontalbar4=CopyMesh(horizontalbar0) Global horizontalbar5=CopyMesh(horizontalbar0) Global horizontalbar6=CopyMesh(horizontalbar0) Global horizontalbar7=CopyMesh(horizontalbar0) Global horizontalbar8=CopyMesh(horizontalbar0) Global horizontalbar9=CopyMesh(horizontalbar0) Global horizontalbar10=CopyMesh(horizontalbar0) Global horizontalbar11=CopyMesh(horizontalbar0) PositionMesh horizontalbar1,0,0,-50 PositionMesh horizontalbar2,0,0,-40 PositionMesh horizontalbar3,0,0,-30 PositionMesh horizontalbar4,0,0,-20 PositionMesh horizontalbar5,0,0,-10 PositionMesh horizontalbar6,0,0,0 PositionMesh horizontalbar7,0,0,10 PositionMesh horizontalbar8,0,0,20 PositionMesh horizontalbar9,0,0,30 PositionMesh horizontalbar10,0,0,40 PositionMesh horizontalbar11,0,0,50 AddMesh(horizontalbar1,horizontalbar0) AddMesh(horizontalbar2,horizontalbar0) AddMesh(horizontalbar3,horizontalbar0) AddMesh(horizontalbar4,horizontalbar0) AddMesh(horizontalbar5,horizontalbar0) AddMesh(horizontalbar6,horizontalbar0) AddMesh(horizontalbar7,horizontalbar0) AddMesh(horizontalbar8,horizontalbar0) AddMesh(horizontalbar9,horizontalbar0) AddMesh(horizontalbar10,horizontalbar0) horizontalbar0footgrid=CopyMesh(horizontalbar0) AddMesh(horizontalbar11,horizontalbar0) Global horizontalbars=CopyMesh(horizontalbar0) FreeEntity horizontalbar0 FreeEntity horizontalbar1 FreeEntity horizontalbar2 FreeEntity horizontalbar3 FreeEntity horizontalbar4 FreeEntity horizontalbar5 FreeEntity horizontalbar6 FreeEntity horizontalbar7 FreeEntity horizontalbar8 FreeEntity horizontalbar9 FreeEntity horizontalbar10 FreeEntity horizontalbar11 Global verticalbars=CopyMesh(horizontalbars) RotateMesh verticalbars,0,90,0 AddMesh(verticalbars,horizontalbars) Global tenfootgrid=CopyMesh(horizontalbars) FreeEntity horizontalbars FreeEntity verticalbars PositionEntity tenfootgrid,0,-.15,0 EntityAlpha tenfootgrid,.25 Global horizontalbar1footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar2footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar3footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar4footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar5footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar6footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar7footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar8footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar9footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar10footgrid=CopyMesh(horizontalbar0footgrid) Global horizontalbar11footgrid=CopyMesh(horizontalbar0footgrid) PositionMesh horizontalbar1footgrid,0,0,1 PositionMesh horizontalbar2footgrid,0,0,2 PositionMesh horizontalbar3footgrid,0,0,3 PositionMesh horizontalbar4footgrid,0,0,4 PositionMesh horizontalbar5footgrid,0,0,5 PositionMesh horizontalbar6footgrid,0,0,6 PositionMesh horizontalbar7footgrid,0,0,7 PositionMesh horizontalbar8footgrid,0,0,8 PositionMesh horizontalbar9footgrid,0,0,9 AddMesh(horizontalbar2footgrid,horizontalbar1footgrid) AddMesh(horizontalbar3footgrid,horizontalbar1footgrid) AddMesh(horizontalbar4footgrid,horizontalbar1footgrid) AddMesh(horizontalbar5footgrid,horizontalbar1footgrid) AddMesh(horizontalbar6footgrid,horizontalbar1footgrid) AddMesh(horizontalbar7footgrid,horizontalbar1footgrid) AddMesh(horizontalbar8footgrid,horizontalbar1footgrid) AddMesh(horizontalbar9footgrid,horizontalbar1footgrid) .c1 FreeEntity horizontalbar0footgrid FreeEntity horizontalbar2footgrid FreeEntity horizontalbar3footgrid FreeEntity horizontalbar4footgrid FreeEntity horizontalbar5footgrid FreeEntity horizontalbar6footgrid FreeEntity horizontalbar7footgrid FreeEntity horizontalbar8footgrid FreeEntity horizontalbar9footgrid EntityAlpha horizontalbar1footgrid,.25 While Not KeyHit(1) UpdateWorld RenderWorld Flip Wend End