Thread: Tokenize
View Single Post
  #4  
Old 06-17-2002, 04:39 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
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
Reply With Quote