Author Topic: [Request] Player Lights  (Read 1150 times)

Is it possible to make the player lights? It would be cool if the white light could be changed different colours.

Quote
Suggestions & Requests

Code: [Select]
function servercmdChangeLight(%client,%light)
{
 if(!isObject(%client.light)){servercmdLight(%client);}
 switch$(%light)
 {
  case "Red": if(isObject(redLight)){%client.light.setDatablock(RedLight);}
  case "Blue": if(isObject(blueLight)){%client.light.setDatablock(BlueLight);}
  case "Green": if(isObject(greenLight)){%client.light.setDatablock(GreenLight);}
  case "RGB": if(isObject(rgbLight)){%client.light.setDatablock(rgbLight);}
  case "White": if(isObject(playerLight)){%client.light.setDatablock(playerLight);}
  case "Bright": if(isObject(brightLight)){%client.light.setDatablock(brightLight);}
  case "Alarm": if(isObject(alarmLightA)){%client.light.setDatablock(alarmLightA);}
 }
}

Type /changelight X, where X is one of the following words:
Red - Red light
Blue - Blue light
Green - Green light
RGB - Blinks red, blue, green
White - Standard
Bright - Bright white
Alarm - Flashing red

You need the basic lights turned on for it to work, and Animated ones for RGB and Alarm. If either of these isn't on then those /changelight cmds won't work. Extract the file below into your Blockland folder.

Download

EDIT2: Released as an addon.
« Last Edit: September 22, 2007, 11:37:45 AM by Space Guy »

Thanks Space Guy. It kinda makes me wonder though... If it was possible to make everyone have to use a certain colour.

Replace the player light with a different light. Change the UI name, but keep the datablock name the same.