Blockland Forums > Modification Help
If Image is unmounted/mounted Still need halp
<< < (3/4) > >>
Swollow:

--- Code: ---package FatManSlowWalk
{
function Player::unMountImage(%this,%slot)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage) && %curImage.className $= "FatManImage")
{
%this.setdatablock("PlayerTacArmor");
}
if(isObject(%curImage) && %curImage.className $= "FatManEmptyImage")
{
%this.setdatablock("PlayerTacArmor");
}
parent::unMountImage(%this,%slot);
}
};
activatePackage(FatManSlowWalk);

--- End code ---
I'm gonna freaking spaz out I've been sitting here trying stuff similar to this for hours what am I doing wrong
Greek2me:
Sorry, %curImage.className would only work with my mod, I should have mentioned that. Change every %curImage.className to %curImage.getName()
Swollow:

--- Quote from: Greek2me on September 22, 2011, 08:32:34 PM ---Sorry, %curImage.className would only work with my mod, I should have mentioned that. Change every %curImage.className to %curImage.getName()

--- End quote ---
Oh gawd thank you
Swollow:

--- Code: ---package FatManSlowWalk
{
function Player::mountImage(%this,%image,%slot,%a,%b)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage))
{
if(%curImage.getName !$= "FatManImage" || %curImage.getName !$= "FatManEmptyImage")
{
if(!isObject(%this.minigame))
{
%this.setDataBlock("PlayerStandardArmor");
}
else
{
%this.setDataBlock(%this.minigame.playerDatablock);
}
}

}
parent::mountImage(%this,%image,%slot,%a,%b);
}
function Player::unMountImage(%this,%slot)
{
%curImage = %this.getMountedImage(%slot);
if(isObject(%curImage))
{
if(%curImage.getName $= "FatManImage" || %curImage.getName $= "FatManEmptyImage")
{
if(!isObject(%this.minigame))
{
%this.setDataBlock("PlayerStandardArmor");
}
else
{
%this.setDataBlock(%this.minigame.playerDatablock);
}
}
parent::unMountImage(%this,%slot);
}
};
activatePackage(FatManSlowWalk);
--- End code ---
k I need a little bit more help
-How can I call the minigames playerdatablock I looked at the parachute addon but it requires %client
-Why does the datablock change only work when your using the fatmanimage and not the fatmanemptyimage?
phflack:
%this.client?
i think %this is the player, just from glancing at it
Navigation
Message Index
Next page
Previous page

Go to full version