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 / Changeable Objects in an open folder

Author
Message
Mikada
21
Years of Service
User Offline
Joined: 28th Jan 2004
Location: Kentucky
Posted: 5th Feb 2004 02:52 Edited at: 5th Feb 2004 02:54
I am trying to make a 3d viewer using dark basic. I need help configuring the code for picking up the new objects that are dropped in the folder skins. I have enclosed my basic code for the viewer. Next I will try a script that changes the skin of the object.

REM SIMPLE VIEWER

sync rate 30
sync on

dim size(75)

load object "gamedata/skins/chynanude000.3ds",1
position object 1,5,-7,0
scale object 1,200,200,200 :

rem Begin main loop
lowmode=0
do

rem Low Mode switch
if lower$(inkey$())="l" and lowmode=0
lowmode=1

backdrop on
color backdrop rgb(0,0,0)
fog off
endif

rem Control Model

if shiftkey()=1 then gosub _start_shift
if upkey()=1 then gosub _start_back
if downkey()=1 then gosub _start_front
if leftkey()=1 then gosub _start_left
if rightkey()=1 then gosub _start_right

sync
loop
return

_start_left:
yrotate object 1,90 :
return
_start_front:
yrotate object 1,0 :
return
_start_right:
yrotate object 1,270 :
return
_start_back:
yrotate object 1,180 :
return
_start_shift:
scale object 1,125,125,125 :
return
_start_alt:
scale object 1,250,250,250 :
return

Mike Cohoon
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 5th Feb 2004 05:19 Edited at: 5th Feb 2004 05:19
look at the code in any of the batch scripts I have written here to find what files are in a folder.

http://www.lunarpixel.net/db_code.htm

the core of the find files code is like this in my example.


you will probably find it easier tho to download the image conversion script as it the above is not a complete source snippet.


Login to post a reply

Server time is: 2025-05-22 11:52:13
Your offset time is: 2025-05-22 11:52:13