Blockland Forums > Modification Help
Force Hug on Vehicles
Deathwishez:
I did this for the HMG Turret.
Of course, the player is standing, so I never encoutered this problem.
Placid:
--- Quote from: otto-san on April 11, 2011, 08:25:43 PM ---make them sit after they hug?
--- End quote ---
sitting is a different variable in the vehicle code.
standing should be 'root'.
erm, i found it.
--- Code: ---mountThread[0] = "root";
--- End code ---
you should find that somewhere in your code. If it is not already, change it to:
--- Code: ---mountThread[0] = "sit";
--- End code ---
If the code is already like that, I have no clue.
Deathwishez:
That's not the problem.
His problem is that they stand up when he tells them to hug.
Greek2me:
Has nobody noticed that I already posted how to do this?
--- Quote from: Greek2me on April 11, 2011, 08:56:49 PM ---Just use the built-in hug command.
package HugPackage
{
function armor::onMount(%this,%obj,%col,%slot)
{
Parent::onMount(%this,%obj,%col,%slot);
if(%col.dataBlock $= legoMobileVehicle)
serverCmdHug(%obj.client);
}
};
activatepackage(HugPackage);
That should work. I think I got the variable for the client right (%obj.client).
--- End quote ---
All I did was take his original code and add in the serverCmdHug part.
Placid:
--- Quote from: Greek2me on April 11, 2011, 10:21:58 PM ---Has nobody noticed that I already posted how to do this?
All I did was take his original code and add in the serverCmdHug part.
--- End quote ---
yeah i noticed that, and then tried it just now and it worked.
use greek2me's code, OP.