Quote:
Originally Posted by callimuc
PHP Code:
function onKeyPressed(code, key) {
if (key == "b") {
this.boots = !this.boots; //change boolean
player.chat = "Boots "@ (this.boots? "on!" : "off!"); //boots are on or off
}
}
|
Not terse enough!
PHP Code:
function onKeyPressed(code, key) {
if (key == "b") {
player.chat = "Boots "@ ((this.boots = !this.boots)? "on!" : "off!");
}
}