Could it be that the code with the object collision/cube deletion should have some kind of for..next loop in it to make it work for all the (duplicate) cube objects, just like the 'load entities' part?
If so, please explain how, cause I've tried everything I knew without success.
Here is the map load and map run code again:
// DevEd 3D Game Engine - Load & run map
_load_map:
// SEND VOICE MESSAGE "Use the arrow keys to move the camera. Ust the w, a, s, d, keys to move the player character."
// Globals :
//GLOBAL player
//GLOBAL object_cube
// Map Settings
SYNC ON
SYNC RATE 60
AUTOCAM OFF
phy start `start de physics engine
// load the map file
map = B3D LOAD OBJECT ("content/maps/map01/map01.dbo")
// Enviromental Settings
FOG ON
FOG Color RGB(161,208,255)
FOG DISTANCE 8000
// create temporary camera
dev_cam = CMR MAKE CAMERA()
COLOR BACKDROP dev_cam,RGB(161,208,255)
SET CAMERA RANGE dev_cam,0.1,9000
POSITION CAMERA dev_cam,0,200,0
// Find and load all limbs/entities of the map
for Limb = 0 to get limb count( map )
// test_cube / object_cube
if instr(limb name$(map, Limb), "test_cube") > 0
object_cube = find free object()
load object "content\models\temp\cube\cube.x", object_cube
position object object_cube, limb position x(map, Limb), limb position y(map, Limb), limb position z(map, Limb)
rotate object object_cube, limb direction x(map, Limb), limb direction y(map, Limb), limb direction z(map, Limb)
endif
// Info_player_start / player
if instr(limb name$(map, Limb), "info_player_start") > 0
player = find free object()
load object "content\models\characters\player\player.x", player
position object player, limb position x(map, Limb), limb position y(map, Limb), limb position z(map, Limb)
rotate object player, limb direction x(map, Limb), limb direction y(map, Limb), limb direction z(map, Limb)
endif
next
// Main map loop
repeat
LOCK BACKBUFFER `Backbuffer op slot en dan data laden
// 3D Stuff
// dev_cam controls
CONTROL CAMERA USING ARROWKEYS dev_cam,10,5
// Temp. player movement
IF KEYSTATE(17)=1
MOVE OBJECT player,-10
ENDIF
IF KEYSTATE(31)=1
MOVE OBJECT player,10
ENDIF
IF KEYSTATE(30)=1
TURN OBJECT LEFT player,10
ENDIF
IF KEYSTATE(32)=1
TURN OBJECT RIGHT player,10
ENDIF
// Temp. cube code
IF OBJECT EXIST(object_cube)
IF OBJECT COLLISION (object_cube, player)
HIDE OBJECT object_cube
ENDIF
ENDIF
UNLOCK BACKBUFFER `Open de backbuffer en render de data
// 2D Stuff
// tekst
Text 3,1,"DevEd 3D v0.1 Alpha"
Text 3,13,"Use the arrow keys to move the camera and use the W,A,S,D keys to move the character."
//PHY UPDATE
SYNC
until escapekey() = 1
end // Ends the program
Thanks!
Regards,
Sph!nx