Author Topic: How do I get the player to hide its head when putting a hat using Hatmod?  (Read 1114 times)

Basically, I made a hat for the "Hatmod by Boodals & JakeBlade" but I want the player's head to be hidden when I put on the hat.

this is an example of what i use normally
Code: [Select]
function Player::unHideNode(%this,%node)
{
parent::unHideNode(%this,%node);
if(%node $= "helmet" || %node $= "pointyHelmet" || %node $= "flareHelmet" || %node $= "bicorn" || %node $= "copHat" || %node $= "knitHat" || %node $= "scouthat")
{
if(getSubStr(%this.getMountedImage(3).getName(),0,3) $= "Hat") //change this to get if the player is wearing a hat, check for the mounted hat's class and see if its HatItem
{
%this.hideNode(%node);
%this.hideNode("visor");
%this.hideNode("plume");
%this.hideNode("triplume");
%this.hideNode("septplume");
}
}

}
if you want head then just change all the %node $= "helmet" stuff to just %node $= "headskin" and it will hide the head plus visor, plume etc.

this is an example of what i use normally
-
if you want head then just change all the %node $= "helmet" stuff to just %node $= "headskin" and it will hide the head plus visor, plume etc.
Idiot question, I am not sure where I would add this code?


uh under a package
Not sure what you mean by that, sorry.
I have only been getting into addons a few days ago

this is an example of what i use normally
Code: [Select]
function Player::unHideNode(%this,%node)
{
parent::unHideNode(%this,%node);
if(%node $= "helmet" || %node $= "pointyHelmet" || %node $= "flareHelmet" || %node $= "bicorn" || %node $= "copHat" || %node $= "knitHat" || %node $= "scouthat")
{
if(getSubStr(%this.getMountedImage(3).getName(),0,3) $= "Hat") //change this to get if the player is wearing a hat, check for the mounted hat's class and see if its HatItem
{
%this.hideNode(%node);
%this.hideNode("visor");
%this.hideNode("plume");
%this.hideNode("triplume");
%this.hideNode("septplume");
}
}

}
if you want head then just change all the %node $= "helmet" stuff to just %node $= "headskin" and it will hide the head plus visor, plume etc.
this wouldnt hide the head unless you changed your avatar though

Idiot question, I am not sure where I would add this code?
how are you putting on/taking off your hat?

how are you putting on/taking off your hat?
hadmod requires zero coding knowledge to make hats. you basically put your model and textures into a hatmod_namehere.zip and you're done

oh lol

well, that complicates things a bit
probably going to need to package one of hatmods functions then