plop problem

Blitz3D Forums/Blitz3D Programming/plop problem

Are you making each button a child of the pivot when it is created ?

My first stab at fixing your 'blocks' code above, I tried parenting the mesh, mesh2, mesh3, etc., to the gamePivot, but got problems of non-existant entities when calling setupboard(). I then realised that you were just using these as 'templates' to be CopyEntity-ed, so all the parenting actually happens in the setupboard() routine.

Make sure that you only load the button ONCE outside the main game loop and that any functions that then set up the environment (eg. level) make a levelPivot the parent of each CopyEntity to create the onscreen buttons.
Global buttonMesh = LoadMesh("rhinothing.b3d")
HideEntity buttonMesh
Global levelPivot = CreatePivot()
...
...
SetupLevel()
Repeat
...
;MainGameLoop
If (new level condition) Then
   FreeEntity levelPivot
   levelPivot = CreatePivot()
   SetupLevel()
EndIf
...
Until 0
;================================================
Function SetupLevel()
for x = 1 to NUMBERBUTTONS
   x = CopyEntity(buttonMesh, levelPivot)
   ...
   PositionEntity x, xPos, yPos, zPos
NextEnd Function

... something like that.

You may need to ShowEntity for each copy - not sure if 'hidden' will be inherited.