Quote:
Originally posted by GrowlZ1010
The command tokenize doesn't accept arguments. Put bluntly, no commas. Also, I'd use startswith instead of strcontains: it means that saying "Oh, yeah, you just say setred to do that" won't trigger the script. What exactly are you trying to do?
|
Say setred to change the color of the light
NPC Code:
// NPC made from ZicklePop Productions
if (created) {
setimg light2.png;
dontblock;
timeout = 0.01;
}
if (timeout) {
//#CLIENTSIDE
if (playerenters) {
setcoloreffect #t(this.red),#t(this.green),#t(this.blue),#t(this. alpha);
drawaslight;
}
if (startswith(#c ,setred )) {
tokenize #c,red;
setplayerprop #c,Red was set to #t(red).;
}
}
Updated