Author Topic: Resizing  (Read 1188 times)

How would you go about resizing a player via scripting?
I tried using
Code: [Select]
%Player.setScale("0.200 0.200 0.200"); to no effect.

its setPlayerScale();

%player.setPlayerScale("X Y Z");



its setPlayerScale();
I tried
Code: [Select]
setPlayerScale(0.200); and it did not work.

Code: [Select]
%player = %client.player;
//resizing stuff

Remember, there is so such variable as %player... 'least not that I've encountered.
« Last Edit: July 05, 2011, 01:21:32 PM by Daenth »

You're using the function right (fyi setScale works too, it just works differently if your parameter doesn't have have all three dimensions)

How are you defining %player?

Code: [Select]
%player = %client.player;
//resizing stuff

Remember, there is so such variable as %player... 'least not that I've encountered.
Depends on the function bro.
It's not always there, and not always missing.

Give the whole script.

Depends on the function bro.
It's not always there, and not always missing.

Give the whole script.
Ah, I see.

This is the script I'm using
Code: [Select]
function BlackPotionImage::onFire(%this,%obj,%slot,%player)
{


for(%i=0;%i<5;%i++)
{
%toolDB = %obj.tool[%i];
if(%toolDB $= %this.item.getID())
{
setPlayerScale(0.200);
%obj.emote(BlackPotiondrinkImage);
%obj.tool[%i] = 0;
%obj.weaponCount--;
messageClient(%obj.client,'MsgItemPickup','',%i,0);
serverCmdUnUseTool(%obj.client);
break;
}
}
}

%player.setplayerscale("0.2 0.2 0.2");

Code: [Select]
function BlackPotionImage::onFire(%this,%obj,%slot)
{


for(%i=0;%i<5;%i++)
{
%toolDB = %obj.tool[%i];
if(%toolDB $= %this.item.getID())
{
%obj.setPlayerScale(0.200);
%obj.emote(BlackPotiondrinkImage);
%obj.tool[%i] = 0;
%obj.weaponCount--;
messageClient(%obj.client,'MsgItemPickup','',%i,0);
serverCmdUnUseTool(%obj.client);
break;
}
}
}
« Last Edit: July 05, 2011, 06:32:13 PM by Headcrab Zombie »

%player.setplayerscale("0.2 0.2 0.2");
Wrong.

%obj.setPlayerScale(0.2);

Wrong.

%obj.setPlayerScale(0.2);
No, you need to define the scale for all 3 dimensions. %obj.setPlayerScale(0.2 0.2 0.2);