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

Popular posts from this blog

python - How to add an model instance to a django queryset? -

Using Android Volley to post an array to PHP -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -