overwrite switch condition to something else -
overwrite switch condition to something else -
im making game , im trying create area area impassible if dont utilize item (key guess). want rewrite switch condition
movefunction () { switch(action) case "east": if (maplocation == 7) { gamemsg = "you cannot pass"; } } useitem() { switch(item) { case "key": if (maplocation == 7) { gamemsg += may pass! //what can write here create area passible? had was: /* switch(action) { case "east": maplocation += 1; break; } */ } } }
yea how far got cant manipulate switch(action) insdie useitem function wont work.
switch-statement overwrite
Comments
Post a Comment