Blockland Forums > Modification Help
Image mount on spawn
<< < (2/3) > >>
Greek2me:

--- Quote from: Thorax on December 21, 2011, 12:36:33 AM ---Last question, how would I hide any backpacks or shoulder-pads the user might have?

--- End quote ---


--- Code: ---function PlayerJuggernautArmor::onAdd(%this,%player)
{
%player.mountImage(JuggernautImage,2);

%player.hideNode(armor);
%player.hideNode(bucket);
%player.hideNode(cape);
%player.hideNode(pack);
%player.hideNode(quiver);
%player.hideNode(tank);
}
--- End code ---
Thorax:

--- Quote from: Greek2me on December 21, 2011, 02:30:31 PM ---
--- Code: ---function PlayerJuggernautArmor::onAdd(%this,%player)
{
%player.mountImage(JuggernautImage,2);

%player.hideNode(armor);
%player.hideNode(bucket);
%player.hideNode(cape);
%player.hideNode(pack);
%player.hideNode(quiver);
%player.hideNode(tank);
}
--- End code ---



--- End quote ---

It didn't work.

I put it in with the /juggernaut command and it works. I just doesn't work with the spawn one.
otto-san:
%player.hideNode($pack[%player.client.pack]);
%player.hideNode($secondpack[%player.client.secondpack]);
Destiny/Zack0Wack0:
Going to bet that onAdd is called before the player has their avatar applied, so it is reshowing it after hiding it.
Thorax:

--- Quote from: Destiny/Zack0Wack0 on December 22, 2011, 02:43:49 AM ---Going to bet that onAdd is called before the player has their avatar applied, so it is reshowing it after hiding it.

--- End quote ---

What should I do to fix that issue?
Navigation
Message Index
Next page
Previous page

Go to full version