Game Development Community

Removing/Changing an individual tile after collision?

by Leroy Frederick · in Torque Game Builder · 06/02/2006 (7:32 pm) · 0 replies

EDIT: Never mind, nicked the solution from Chris Cockcroft code ;)

Sample code:

function TargetObjectClass::onCollision(%srcObj, %dstObj, %srcRef, %dstRef, %time, %normal, %contactCount, %contacts)
{
if(%dstObj.class $= "BounceObjectClass")
{
%srcObj.clearTile(%srcRef);
}
}

Forum solution link: www.garagegames.com/mg/forums/result.thread.php?qt=27178