Author Topic: Crown  (Read 1026 times)

Here is what I want to do. I am making a king playertype but it is failing atm.

Code: [Select]
datablock PlayerData(PlayerKing : PlayerStandardArmor)
{
minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;

uiName = "King Player";
showEnergyBar = false;
};

function PlayerKing::onAdd(%this,%obj)
{
parent::onAdd(%this,%obj);
%obj.mountimage(Crownimage,2);
}
I know the mount is 2 (body)

When using setplayerdatablock, it doesn't add the crown. How do I make it so when it does use setplayerdatablock, it mounts the crown?
« Last Edit: September 27, 2009, 05:54:14 PM by heedicalking »

You cannot do it with mounted images without creating a million different kinds for every possible colour it could be. Note how when holding the skis they are always blue - it's only when you put them on and it uses nodes built into the player model (which we cannot add yet) that they change to your paint colour.


You could probably make a script that finds the chest color and creates a RGB equivalent for colorshift. :D

Creating datablocks on the go is a really bad way to do it.

Also, Funky Shirt would probably push your server over the datablocks limit in about ten seconds.

Doesn't badspot use color shift to color the player body parts?
If so, i think there might be a way to do this.

Badspot uses nodes built into the player model. We cannot currently add to this. Ripping the model source will not help as anyone else's Add-On using the same method will break yours.

How would I mount an image when a certain playertype is spawned? Like king playertype has a crown mounted to it.

Doesn't badspot use color shift to color the player body parts?
If so, i think there might be a way to do this.
No.
It uses setNodeColor.

Here is what I want to do. I am making a king playertype but it is failing atm.

Code: [Select]
datablock PlayerData(PlayerKing : PlayerStandardArmor)
{
minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;

uiName = "King Player";
showEnergyBar = false;
};

function PlayerKing::onAdd(%this,%obj)
{
parent::onAdd(%this,%obj);
%obj.mountimage(Crownimage,2);
}
I know the mount is 2 (body)

When using setplayerdatablock, it doesn't add the crown. How do I make it so when it does use setplayerdatablock, it mounts the crown?

bump4titlechange and edited topic.
« Last Edit: September 27, 2009, 05:57:47 PM by heedicalking »

And now everyone will be confused because you edited the OP instead of making a new topic.



Armor::onNewDatablock
So it should look like.
Code: [Select]
datablock PlayerData(PlayerKing : PlayerStandardArmor)
{
minJetEnergy = 0;
jetEnergyDrain = 0;
canJet = 0;

uiName = "King Player";
showEnergyBar = false;
};

function Armor::OnNewDatablock(%this,%obj)
{
parent::onAdd(%this,%obj);
%obj.mountimage(Crownimage,2);
}