Hello everybody!
I have a simple program that loads a .dbo map file made with 3D world studio. There is a camera with basic controls to fly around with. I've also placed thee children, or limbs, in it called 'item_score'. Item_score gets loaded and at a model gets spawned at its location.
Here is the code so far :
// Load & run map
_load_map:
// Globals :
GLOBAL item_score
// Map Settings
SYNC ON
SYNC RATE 60
AUTOCAM OFF
// 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
//test = B3D LOAD OBJECT ( "content\models\item_score\item_score.x" )
// Find and load all limbs/entities of the map
for Limb = 0 to get limb count( map )
// score item
if instr(limb name$(map, Limb), "item_score") > 0
item_score = find free object()
item_score_model = B3D LOAD OBJECT ( "content\models\item_score\item_score.x" )
position object item_score, limb position x(map, Limb), limb position y(map, Limb), limb position z(map, Limb)
rotate object item_score, 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
// TEMP controls
CONTROL CAMERA USING ARROWKEYS dev_cam,10,5
//UNLOCK BACKBUFFER `Open de backbuffer en render de data
// 2D Stuff
// tekst
Text 3,1,"Use the arrow keys to move the camera."
//PHY UPDATE
SYNC
until escapekey() = 1
end // Ends the program
This is a simple setup for static models, but not if every 'item_score' would have its actions.
For this I need to load them in as types, place them in the "// Find and load all limbs/entities of the map" and then update them in the main map loop...
I've tried everything but I don't understand the types...
I need something similar to the Incapro demo but totally simplified... Is there a more simple inca pro like example around?
Any help is greatly appreciated!
Regards,
Sph!nx
www.DevEd-portal.com