Nope. Once glued, you can reposition the limbs. Every object is limb 0 in itself. If you glued objects 3,4,5,6 to object number 2, you can rotate 2 and the others would rotate as if it were one big object. A good example of this would be my flag code. Lemme search for it quickly.
Oops, forgot to mention, this is DBC code.
I just tested it in DBP, and it works, sorta. You'll have to add
set object flagNumber, 1,1,0 in the example. Cull setting. Also, I've noticed that the flag isn't updating it's movement in Pro. Might be DBP problems with the limb commands. I'm looking into it. Argh, can't figure why it doesn't update its motion.
Here is the flag.dba file I've created with documentation.
REM Create by: Phaelax (phaelax@hotmail.com)
REM Idea spawned by: Kevil
REM Originally created using matrices by Kevil
REM
REM ------------------------------------------------------------------------
REM This function prepares an image to be used as the flag's texture.
REM Image should be of dimensions 512x256 and must be of format BMP
REM Be sure this function is called before the 3D environment is turned on.
REM (IE. backdrop on, or an object is created)
REM Image numbers 65001 to 65016 are used. Be sure these image numbers don't
REM already exist and that you don't use these image numbers in the future.
REM
REM PARAMETERS:
REM -----------
REM flagTexture$ = the name of image file. (ex. "myflag.bmp")
function _create_flag_texture(flagTexture$)
load bitmap flagTexture$
set current bitmap 0
for x=0 to 15
get image x+65001,x*32,0,(x+1)*32,256
next x
endfunction
REM This function will create the flag and texture it, if specified.
REM Also, object number 65001 is temporarily used during the creation of the
REM flag object. So be sure that object number is not in use.
REM
REM PARAMETERS:
REM -----------
REM obj = object number you wish the flag to be
REM textureFlag = 1 to texture, 0 to not texture. (Only turn on texture if
REM _create_flag_texture() was called)
function _make_object_flag(obj,textureFlag)
make object cylinder obj,10
set object obj,1,1,0
hide limb obj,0
for x=1 to 16
make object plain 65001,100,100
make mesh from object x+65000,65001
delete object 65001
add limb obj,x,x+65000
if textureFlag = 1 then texture limb obj,x,x+65000
next x
make object cylinder 65001,100
make mesh from object 65017,65001
delete object 65001
add limb obj,17,65017
scale limb obj,17,5,150,5
offset limb obj,17,0,-30,0
color limb obj,17,rgb(130,100,75)
endfunction
REM This function calculates and updates the motion of the flag.
REM This function must be called within some sort of main loop to
REM see the effect take place.
REM
REM PARAMETERS:
REM -----------
REM obj = Flag object number. (Same number as the one used for creation)
REM waveStrength# = How strong the waves should appear.
REM waveAmount# = Higher number produces more waves. (the number itself
REM does not represent the actual number of waves)
REM waveSpeed# = How fast the flag should wave about.
REM maxPoint# = This sets a limit on how far the flag can wave or stretch
REM out into space. (0-16)
REM
REM The spacing# variable within the function is there for the programmer.
REM It represents the base width of each panel in the flag. This should not
REM be changed unless farther changes are done as well.
function _update_flag(obj,waveStrength#,waveAmount#,waveSpeed#,maxPoint#)
spacing# = 10
for t=1 to 16
if t <= maxPoint# then q=t
oldfz# = fz#
fz# = cos(wrapvalue(fa#-t*waveAmount#))*((q-1)*waveStrength#)
oldfx# = (t-1) * spacing#
fx# = t*spacing#
if t>1
if fz#>oldfz#
tanx#=abs(fx# - oldfx#)
tanz#=abs(fz# - oldfz#)
xpos#=oldfx#+tanx#/2
zpos#=oldfz#+tanz#/2
angle# = wrapvalue(atanfull(tanx#,tanz#)-90)
dist# = sqrt(tanx#^2 + tanz#^2)
else
tanx#=abs(fx# - oldfx#)
tanz#=abs(fz# - oldfz#)
xpos#=oldfx#+tanx#/2.0
zpos#=oldfz#-tanz#/2.0
angle# = 360-wrapvalue(atanfull(tanx#,tanz#)-90)
dist# = sqrt(tanx#^2 + tanz#^2)
endif
scale limb obj, t,dist#+1,80,100
else
if fz#>0
tanx#=abs(fx#)
tanz#=abs(fz#)
xpos#=tanx#/2.0
zpos#=tanz#/2.0
angle# = wrapvalue(atanfull(tanx#,tanz#)-90)
dist# = sqrt(tanx#^2 + tanz#^2)
else
tanx#=abs(fx#)
tanz#=abs(fz#)
xpos#=tanx#/2.0
zpos#=tanz#/2.0
angle# = 360-wrapvalue(atanfull(tanx#,tanz#)-90)
dist# = sqrt(tanx#^2 + tanz#^2)
endif
scale limb obj, t,dist#+1,80,100
endif
offset limb obj,t,xpos#,0,zpos#
rotate limb obj,t,0,wrapvalue(angle#+qfa#),0
next t
fa#=wrapvalue(fa#+waveSpeed#)
endfunction
And here's an example using the functions in flag.dba. You'll have to make your own flag texture, as I have not included the media.
REM Originally created using matrices by Kevil
REM
REM By using the included file, you can now easily create a waving
REM flag object. Once the flag object is created, all the normal object
REM functions are available. Such as scale, position, and rotate.
set display mode 800,600,32
sync on
autocam off
hide mouse
#include "flag.dba"
rem a 512x256 image is used
_create_flag_texture("pyramid2.bmp")
backdrop on
color backdrop 0
make matrix 1, 1000,1000,10,10
flagNumber = 200
_make_object_flag(flagNumber, 1)
make object cone 1,6
make mesh from object 18,1
add limb flagNumber,18,18
offset limb flagNumber,18,0,47.5,0
color limb flagNumber,18,rgb(200,200,130)
waveStrength# = 10.0
waveAmount# = 30.0
waveSpeed# = 10.0
maxPoint# = 2.0
setx# = 100.0
sety# = 100.0
setz# = 200.0
DO
_update_flag(flagNumber,waveStrength#,waveAmount#,waveSpeed#,maxPoint#)
if scancode()=2 then ya#=wrapvalue(ya#+3)
if scancode()=3 then ya#=wrapvalue(ya#-3)
if inkey$()="a" then dec setx#,5
if inkey$()="d" then inc setx#,5
if inkey$()="w" then inc setz#,5
if inkey$()="s" then dec setz#,5
position object 200,setx#,sety#,setz#
yrotate object 200, ya#
gosub player_controls
gosub camera_status
sync
LOOP
PLAYER_CONTROLS:
if shiftkey()=1 then runspeed#=6.0
if upkey()=1
x#=newxvalue(x#,a#,6+runspeed#)
z#=newzvalue(z#,a#,6+runspeed#)
endif
if downkey()=1
x#=newxvalue(x#,a#,-6-runspeed#)
z#=newzvalue(z#,a#,-6-runspeed#)
endif
if leftkey()=1
x#=newxvalue(x#,wrapvalue(a#-90.0),5.0+runspeed#)
z#=newzvalue(z#,wrapvalue(a#-90.0),5.0+runspeed#)
endif
if rightkey()=1
x#=newxvalue(x#,wrapvalue(a#+90.0),5.0+runspeed#)
z#=newzvalue(z#,wrapvalue(a#+90.0),5.0+runspeed#)
endif
RETURN
CAMERA_STATUS:
rem rotate camera according to mouse
a#=wrapvalue(a#+(mousemovex()/3.0))
rem position and rotate camera
cxa#=cxa#+(mousemovey()/3.0)
if cxa#<-90.0 then cxa#=-90.0
if cxa#>90.0 then cxa#=90.0
position camera x#,y#+150,z#
rotate camera wrapvalue(cxa#),a#,0
RETURN