Blockland Forums > Modification Help
Force Hug on Vehicles
Daenth:
--- Quote from: Greek2me on April 20, 2011, 10:50:11 PM ---Try this.
-snip-
BTW, I'm guessing on the playThread bit.
--- End quote ---
--- Code: ---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);
}
};
activatepackage(HugPackage);
--- End code ---
No idea what action number hugging sets itself to. So just replace the hug with the playThread.
Blastdown:
--- Quote from: Daenth on April 21, 2011, 01:58:43 AM ---No idea what action number hugging sets itself to. So just replace the hug with the playThread.
--- End quote ---
This fixes the hands, but now I am sit-walking when I exit the vehicle.
Haha.
Daenth:
Try this
--- Code: ---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 code ---
Blastdown:
--- Quote from: Daenth on April 21, 2011, 02:27:26 PM ---Try this
--- End quote ---
That appears to have done it.
Unless a problem is found, that should do it. Thanks.
Daenth:
--- Quote from: Blastdown on April 21, 2011, 03:14:07 PM ---That appears to have done it.
Unless a problem is found, that should do it. Thanks.
--- End quote ---
The credit goes to Greek, I only added the playThread lines.