Author Topic: Dts collision  (Read 691 times)

How would I have a projectile detect a .dts/collision rather then a brick.
This detects the brick "Test", What would detect a .dts called "Test"?
Code: [Select]
function ToolProjectile::oncollision(%this,%obj,%col,%fade,%pos,%normal)
{
if(!isobject(%col)){return;}
if(%col.getDatablock() $= nametoid("brickTestData"))
{

Simply put the datablock of a collideable shape object...

Simply put the datablock of a collideable shape object...

Yay for Coding Help's 10,000th post.



What I mean is what would be the base data block for the dts?

if((%col.getClassName() $= "fxDtsBrick" && getSubStr(%shape = %col.getDatablock().collisionShapeName,strLen(%shape)-8,8) $= "Test.dts") || getSubStr(%shape = %col.getDatablock().shapeName,strLen(%shape)-8,8) $= "Test.dts")
{

Maybe that might work. :o

StaticShapeData
Wouldn't you use that and just do if(%col.getClassName() $= "StaticShape") or something, then check the datablock name?