Blockland Forums > Modification Help

setPlayerScale on weapon use?

Pages: << < (2/2)

herb:


--- Quote from: Tom on August 03, 2010, 06:43:55 PM ---Parent isn't necessary because he isn't modifying existing code.

--- End quote ---

oh, i seemed to have missed that

Red_Guy:

3 problems...

1 - ::onFire() is only called when you shoot the weapon, so nothing is going to happen until you pull the trigger
2 - code needs a little fixing:

--- Code: ---function exampleImage::onFire(%this, %player, %obj, %slot)
{
    %player.setscale("2 2 2");
}

--- End code ---

3 - To do what you want, you need to set the player scale when the weapon is actually picked up.  If I remember correctly, there is a "onToolPickup" message that you can package to catch this.


Triple Nickels:


--- Quote from: herb on August 02, 2010, 06:31:53 PM ---i think you are missing a parent

--- End quote ---
/glare


--- Quote from: Red_Guy on August 04, 2010, 03:53:32 PM ---3 problems...

1 - ::onFire() is only called when you shoot the weapon, so nothing is going to happen until you pull the trigger
2 - code needs a little fixing:

--- Code: ---function exampleImage::onFire(%this, %player, %obj, %slot)
{
    %player.setscale("2 2 2");
}

--- End code ---

3 - To do what you want, you need to set the player scale when the weapon is actually picked up.  If I remember correctly, there is a "onToolPickup" message that you can package to catch this.


--- End quote ---

you are my hero of the day

otto-san:


--- Quote from: Triple Nickels on August 06, 2010, 02:19:53 AM ---/glare

you are my hero of the day

--- End quote ---

lol

Pages: << < (2/2)

Go to full version