Hi there,
currently Im working on a "Map preperation system" for my shooter but ran in an unexcepted problem there:
The following Code is ment to be used for every map I want to load and It is working ... the only thing thats not working is Sparky´s Collision DLL
load object "Levels/Level1/testlevel.dbo",map,3
perform checklist for object limbs map
totallimbs = checklist quantity()
for t = 1 to totallimbs
if limb exist(map,t)=1
mapobj=Free_object()
clone object mapobj,map,1
for limb = totallimbs-1 to 1 step -1
if limb<>t
remove limb mapobj,limb
else
x#= limb position x(map,t)
y#= limb position y(map,t)
z#= limb position z(map,t)
LINK LIMB mapobj, 0, limb
position object mapobj,x#,y#,z#
endif
next limb
if right$(left$(LIMB NAME$(mapobj,1),15),5)="metal"
endif
if right$(left$(LIMB NAME$(mapobj,1),14),4)="wood"
endif
if right$(left$(LIMB NAME$(mapobj,1),15),5)="stone"
`play sound 9
SC_Setupobject mapobj,3,0
SC_setObjectCollisionOn mapobj
endif
endif
next t
hide object map
So to make it short Im loading a map and create a clone of that map for each limb it has ... than im removing all limbs from the different objects except for one ... so every limb of the original map is existing as seperate object (I ran in some very strange problems with "Make object from limb").
Here Im checking which material the limb is ment to be
if right$(left$(LIMB NAME$(mapobj,1),15),5)="stone"
`play sound 9
SC_Setupobject mapobj,3,0
SC_setObjectCollisionOn mapobj
endif
the check works as the sound plays ... but directly after the sound is played one time the game crashes.
The map is correctly build up ... and running smooth even with normal map shader mixed with lightmaps (when I comment the SC Commands out).
So could it be that Sparky´s Collision DLL has problems with objects that got limbs removed? Maybe I have to call a command to recalculate the objects or something (I allready tried "calculate object bounds"). I hope you can help me ... or maybe tell me where to find more infos on Sparky´s DLL ... the helpfile didn´t help me here.