Blockland Forums > Modification Help
Mounting To Back Crashing Blockland
jes00:
Whenever I mount the item to my back if I go into third person mode Blockland crashes. Anyone know how to fix this?
--- Code: --- function FLUDDImage::onMount(%this, %obj, %slot)
{
parent::onMount(%this, %obj, %slot);
%obj.playThread(1, root);
%obj.mountImage(FLUDDImage, 2);
%obj.hideNode(cape);
%obj.hideNode(pack);
%obj.hideNode(quiver);
%obj.hideNode(tank);
%obj.hideNode(armor);
%obj.hideNode(bucket);
}
function FLUDDImage::onUnMount(%this, %obj, %slot)
{
parent::onUnMount(%this, %obj, %slot);
%obj.unMountImage(2);
%obj.client.applyBodyParts();
%obj.client.applyBodyColors();
}
--- End code ---
Chrono:
Why are you mounting it after mounting it already?
Why are you unmounting it after it's unmounted?
jes00:
--- Quote from: Chrono on March 28, 2012, 04:39:10 PM ---Why are you mounting it after mounting it already?
Why are you unmounting it after it's unmounted?
--- End quote ---
Hmm, never thought of that.
--- Code: --- function FLUDDImage::onMount(%this, %obj, %slot)
{
parent::onMount(%this, %obj, %slot);
%obj.unMountImage(2);
%obj.client.applyBodyParts();
%obj.client.applyBodyColors();
//unMount from their hand before mounting it to their back
%obj.playThread(1, root);
%obj.mountImage(FLUDDImage, 2);
//Mount it to their hand
%obj.hideNode(cape);
%obj.hideNode(pack);
%obj.hideNode(quiver);
%obj.hideNode(tank);
%obj.hideNode(armor);
%obj.hideNode(bucket);
//Hide anything already on their back
}
function FLUDDImage::onUnMount(%this, %obj, %slot)
{
parent::onUnMount(%this, %obj, %slot);
%obj.unMountImage(2);
//unMount the image on their back
%obj.client.applyBodyParts();
%obj.client.applyBodyColors();
//Put on any clothes they had on their back
}
--- End code ---
jes00:
Grr, even that crashes Blockland.
Lugnut:
try putting the parent after all the stuff that unmounts/mounts the backpack/quiver/bucket