datablock PlayerData(InvisiblePlayerNoJet : PlayerStandardArmor){ minJetEnergy = 0; jetEnergyDrain = 0; canJet = 0; uiName = "Invisible No-Jet Player"; showEnergyBar = false;};function InvisiblePlayerNoJet::onNewDatablock(%data, %obj){ Parent::onNewDatablock(%data, %obj); %obj.setShapeNameDistance(0); %obj.hideNode("ALL");}
function InvisiblePlayerNoJet::onAdd(%data, %obj){ %obj.setShapeNameDistance(0); %obj.hideNode("ALL");}
Right Here http://justfilehosting.space/download.php?f=gdwnc
So we don't need the parent for onAdd, but we need it for onNewDatablock?
onNewDatablock is called when you change a datablock to a different datablock (does not call after that), basically, but I'm not sure if I should include the parent.
Armor::onNewDatablock does something by default, so you should parent it.
From what I seen it helps apply nodes on the avatar, since one time I forgot to parent it and my character looked like an AI player