Blockland Forums > Modification Help
setPlayerScale on weapon use?
XaMMaX211:
I want it so when you use a weapon, your scale changes.
So far I have...
--- Code: ---function exampleImage::onFire(%player, %obj, %slot)
{
%client.player.setscale("2 2 2");
}
--- End code ---
MegaScientifical:
Ya, that won't work because there's no client.
--- Code: ---function exampleImage::onFire(%image, %player, %slot) {
if(%player.getScale() $= "2 2 2")
%player.setscale("1 1 1");
else
%player.setscale("2 2 2");
}
--- End code ---
Okay, not sure about which is the player, but first should always be the object calling, so it should be the image.
Obibital:
You mean like the Mushroom thing from Mario?
Someone made it and you could look at the script for future references :p
herb:
i think you are missing a parent
Tom:
--- Quote from: herb on August 02, 2010, 06:31:53 PM ---i think you are missing a parent
--- End quote ---
Parent isn't necessary because he isn't modifying existing code.