Blockland Forums > Modification Help
Force Hug on Vehicles
Greek2me:
--- Quote from: Daenth on April 21, 2011, 02:27:26 PM ---Try this
package HugPackage
{
function armor::onMount(%this,%obj,%col,%slot)
{
Parent::onMount(%this,%obj,%col,%slot);
if(%col.dataBlock $= legoMobileVehicle)
%obj.playThread(2, armReadyBoth);
}
function armor::onUnMount(%this,%obj,%col,%slot)
{
Parent::onMount(%this,%obj,%col,%slot);
if(%col.dataBlock $= legoMobileVehicle)
%obj.playThread(2, root);
%obj.playThread(0, root);
}
};
activatepackage(HugPackage);
--- End quote ---
Oops, change from onMount to onUnMount. I also have a feeling that the 4th arguement (%slot) in onUnMount doesn't exist.