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 Professional Discussion / Problem with limb positions

Author
Message
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 24th Apr 2003 01:38 Edited at: 24th Apr 2003 01:53
I'm trying to get all the limb positions from a very simple X file (it is just two rectangles, and converted using Deep Exploration). However, it returns the number of limbs -1 (ie 2). It is set up like this :

NULL Object
| Test
+ Planexxx

To start with the program displays no limb name, followed by NULLObject, followed by Planexxx. For some reason the test limb is ignored.

In addition, a run-time error seems to mean that it cant get the positions for the test.

The number of limbs returned is 4 - I think this should be three.

How can I get all the correct limb positions ?

It seems that the LIMB POSITION X,Y and Z commands cause the problem - without any or all of these, I can get all the names

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 25th Apr 2003 00:37
No-one else having problems with limb positions ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 25th Apr 2003 01:31
not sure i understand your problem..what i know for sure is that limb position , in DBP returns the limb offset from the center of the object..
i use this revised version of an old DB program to check them:


Rem * Title : Adding Limbs
Rem * Author : DBS-LB
Rem * Date : 1st Sept 99
rem ===============================================
rem DARK BASIC EXAMPLE PROGRAM 5
rem ===============================================
rem This program adds a new limb to an object
rem -----------------------------------------------
autocam off
backdrop off
set ambient light 80
t=0
l=0
numberoflimbs=0
rem Load your object
load object "folder\object.x",1
position object 1,100,0,0
yrotate object 1,90
position camera 0,200,-300
point camera 0,50,0
rem hide object 1
rem Find out how many limbs the object has and hide them
perform checklist for object limbs 1
numberoflimbs=checklist quantity()
print " numberoflimbs=",numberoflimbs
print "Press Any Key "
wait key
cls
for t=0 to numberoflimbs-1
hide limb 1,t
set cursor 0,0
print " "
set cursor 0,0
print t
rem wait key
rem endif
next t

rem Scroll through object limbs
for l=0 to numberoflimbs

rem Clear the screen
cls

rem Show each limb as it is viewed
if limb exist(1,l)=1
show limb 1,l

rem Print information about object
print "Limb Information"
print "----------------"
print
print "Limb Number:";l
print
rem if limb exist(1,l)=1
print "limb offset x = ";limb offset x(1, l)
print "limb offset y = ";limb offset y(1, l)
print "limb offset z = ";limb offset z(1, l)
print "limb angle x = ";limb angle x(1, l)
print "limb angle y = ";limb angle y(1, l)
print "limb angle z = ";limb angle z(1, l)
print "limb position x = ";limb position x(1, l)
print "limb position y = ";limb position y(1, l)
print "limb position z = ";limb position z(1, l)
print "limb texture = ";limb texture(1, l)
print "limb visible = ";limb visible(1, l)
else end
endif
rem Wait for key press
print
print "Press Any Key"
wait key
hide limb 1,l
Rem Complete next loop
next l
wait key
rem End the program
end
MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 25th Apr 2003 01:43 Edited at: 25th Apr 2003 01:54
I think the problem was that I was starting at 1 and going to the number of limbs, as opposed to num-1...

I was also getting the limb name incorrectly...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!

Login to post a reply

Server time is: 2026-07-11 12:01:43
Your offset time is: 2026-07-11 12:01:43