Barber

Author Topic: Barber  (Read 6162 times)

More reason for the existence of recolorable bot hats. Having arbitrarily chosen colors that add several datablocks is dumb

Code: [Select]
datablock ShapeBaseImageData(Barber_Hair_stylehere_colorhere)
{
   shapeFile = "./Barber_urHairModel.dts"; //barber_ not really necesarry, but i was worried about conflict
   mountPoint = $HeadSlot;
   offset = "0 0 0.05";
   eyeOffset = "0 0 -99";
   rotation = eulerToMatrix("0 0 0");
   scale = "0.1 0.1 0.1";
   doColorShift = true;
   colorShiftcolor = "0.2 0.2 0.2 1";
   uiName = "hair name displayed in barber menu";
};

But how does it work in game?

it runs the code to give you a hair




More reason for the existence of recolorable bot hats. Having arbitrarily chosen colors that add several datablocks is dumb
Could be done with a playertype, but it's a bit silly, works tho!

I've done this before:
Code: [Select]
function NeedsMember::colorPlumbob(%this)
{
if(isObject(%this.player.getControllingClient().plumbob))
{
%needsSum = %this.hunger+%this.thirst+%this.energy+%this.fun+%this.hygiene+%this.toilet;
%r = 1-(%needsSum/60)*1.5;
if(%r>1)
%r = 1;
%g = %needsSum/60;
%color = %r SPC %g SPC "0.2 1";
%this.player.getControllingClient().plumbob.setNodeColor("plumbob",%color);
}
}
Code: [Select]
datablock PlayerData(PlumbobObject)
{
  emap = true;
 
    class = Armor;
    shapeFile = "./plumbob.dts";
cameraVerticalOffset = 1.5;
};
« Last Edit: September 10, 2018, 03:13:47 AM by Quartz »



Could be done with a playertype, but it's a bit silly, works tho!

I've done this before:
Code: [Select]
function NeedsMember::colorPlumbob(%this)
{
if(isObject(%this.player.getControllingClient().plumbob))
{
%needsSum = %this.hunger+%this.thirst+%this.energy+%this.fun+%this.hygiene+%this.toilet;
%r = 1-(%needsSum/60)*1.5;
if(%r>1)
%r = 1;
%g = %needsSum/60;
%color = %r SPC %g SPC "0.2 1";
%this.player.getControllingClient().plumbob.setNodeColor("plumbob",%color);
}
}
Code: [Select]
datablock PlayerData(PlumbobObject)
{
  emap = true;
 
    class = Armor;
    shapeFile = "./plumbob.dts";
cameraVerticalOffset = 1.5;
};
I done it before too, I was just too lazy to make another hatmod system for it

Hey, this really is cool!




This is how far a graphics design college degree can get you!

But how does it work in game?
OnActivate > Client > openBarberMenu
It can also be used with bots