Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / DarkMatter help

Author
Message
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 13th Nov 2005 18:22
i need major help i am a totol newbie i just got DB and it came with darkmatter how do i get the models into my game to i can use the load object command will someone that has some time and is willing to help pls give me a very detailed list of instructions thanx

ATI mobility radeon X600 graphics card
AMD 64 Bit processor
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 13th Nov 2005 23:11
load object <Path to object (including extension)>,<Object number>

if object is in the same directory your program is, then just the filename...

...maybe one day I'll finish a project
x1b
20
Years of Service
User Offline
Joined: 19th Sep 2004
Location:
Posted: 14th Nov 2005 00:19 Edited at: 14th Nov 2005 00:28
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..
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 14th Nov 2005 22:40
How do i import or can u give me a file name that is already in DB that came with it and tell me how to do that because i am really stuck

ATI mobility radeon X600 graphics card
AMD 64 Bit processor
Captain America
20
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Here
Posted: 16th Nov 2005 05:55 Edited at: 16th Nov 2005 05:56
Hello,

To import objects into DarkBASIC you can use this code:
(it should work if you installed DB in the default folder)



This code will load the walk.x file into DarkBASIC.

!!!This code will only work with DarkBASIC Classic!!!


-Captain-


Cheers,
Capt. America
DB newbie
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: um..... i dont remember.
Posted: 19th Nov 2005 01:15
ok i did wat captain said with the walk file it worked fine but i tried it with the crouch goblin and it didnt work can u help me ill show u my code that i used in the snippet.

ATI mobility radeon X600 graphics card
AMD 64 Bit processor

Login to post a reply

Server time is: 2025-05-22 19:54:27
Your offset time is: 2025-05-22 19:54:27