You may not need to use all these commands,Db Newb, however, here is some in game code for a DarkMatter object I imported.
rem add NPC(Zoogan the Terrible)
load object "mediaPCNPCZooganZoogan.x",12
position object 12,108,12,108
loop object 12,f(0,12), f(80,12)
yrotate object 12,270
xrotate object 12,270
yrotate object 12,wrapvalue(object angle y(12)+43.0)
set object speed 12,6000
set object light 12,0
CollisionTypePRO(12,type_World)
SetObjScalePRO(12,6,6,6)
`keep up with changes to animation so you can go back to idle
change=0
Allow me to break this down for you..
load object "mediaPCNPCZooganZoogan.x",12
is the path to where I have the model stored and the number assigned to that model.
position object 12,108,12,108
is the objects XYZ location in my game
loop object 12,f(0,12), f(80,12)
Now this one is interesting. Many/Most of the objects in DarkMatter
are animated! However,they require a function() to be written to animate them. My function looks like rem correct frame for DM2 animations
function f(frame,obj)
fr = int(frame * (total object frames(obj)/650.0))
endfunction fr
note: this is not *my* code as I beleive it was actually done by rich handed down to me by LIT
this code here rotates the object so it appears to be standing upright. It is very well that when you import yours? that it appears to be laying sideways. take this code and play with the numbers until you get desired position.
yrotate object 12,270
xrotate object 12,270
yrotate object 12,wrapvalue(object angle y(12)+43.0)
Even after animating your object? It may appear to move slow or not at all. The following code will speed up the animation. Again adjust this code to taste
set object speed 12,6000
this piece of code I use for personal reasons. you may or may not want to use it. Its just to cast light onto the model.
set object light 12,0
And the rest you wont need to learn about NORE use it in your game
for sometime to come..
CollisionTypePRO(12,type_World)
SetObjScalePRO(12,6,6,6)
`keep up with changes to animation so you can go back to idle
change=0
I know ive left you with countless questions and this explanation requires some more indepth detail, but im tired and have been working on my game all freekin day. I'll come back and redo this later on for you
- Do it, Do it Right, Do it right now..