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";};
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's not events?
More reason for the existence of recolorable bot hats. Having arbitrarily chosen colors that add several datablocks is dumb
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); }}
datablock PlayerData(PlumbobObject){ emap = true; class = Armor; shapeFile = "./plumbob.dts"; cameraVerticalOffset = 1.5;};
0/10 no rainbow color
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;};
Hey, this really is cool!
[img]