| Blockland Forums > Modification Help |
| Rainbow hat |
| (1/2) > >> |
| Deriboy:
I don't know what went wrong here. It was working fine until I added in the random values for the hat color. I didn't write/understand this script enough to really debug it. the rainbowplayerloop function doesn't seem to be executing because i'm not getting any echos in the console.Nevermind, I fixed it myself. --- Code: ---if (!$RainbowPlayerBindings) { $remapDivision[$remapCount] = "Rainbow Player"; $remapName[$remapCount] = "Activate/Deacticate"; $remapCmd[$remapCount] = "RainbowPlayerToggle"; $remapCount++; $RainbowPlayerBindings=true; } $RainbowPlayerCount=0; $RainbowPlayerFlag=0; $RainbowPlayerTempHat=$pref::Avatar::HatColor; function RainbowPlayerToggle(%val) { if(%val) { if($RainbowPlayerFlag==0) { $RainbowPlayerFlag=1; $RainbowPlayerTempHat=$pref::Avatar::HatColor; RainbowPlayerLoop(); } else if($RainbowPlayerFlag==1) { $RainbowPlayerFlag=0; cancel($RainbowPlayer); $pref::Avatar::HatColor=$RainbowPlayerTempHat; clientcmdupdateprefs(); } } } function rainbowreset() { cancel($RainbowPlayer); $pref::Avatar::HatColor=$RainbowPlayerTempHat; clientcmdupdateprefs(); } function RainbowPlayerLoop() { $R = getrandom(225); $G = getrandom(225); $B = getrandom(225); $pref::Avatar::HatColor=$R SPC $G SPC $B SPC "1"; clientcmdupdateprefs(); echo($R); echo($G); echo($B); $RainbowPlayer=schedule(1000,0,RainbowPlayerLoop); } --- End code --- |
| Darth Maul:
Another stupid rainbow avatar script THEY DONT WORK AND THEY SUCK |
| SpreadsPlague:
why exactly do you want to echo their values anyways? unless you enjoy your console being spammed with numbers.. |
| TomTheGeek:
--- Quote from: Darth Maul on July 17, 2010, 06:10:20 AM ---Another stupid rainbow avatar script THEY DONT WORK AND THEY SUCK --- End quote --- Really. All Badspot did was limit the amount of changes on an avatar in a second I belive. IT still works. I have a modded one that is blue, and it flashes. |
| Katamari007:
--- Quote from: Darth Maul on July 17, 2010, 06:10:20 AM ---Another stupid rainbow avatar script THEY DONT WORK AND THEY SUCK --- End quote --- Don't post if you're not going to help |
| Navigation |
| Message Index |
| Next page |