0 votes
by (2.9k points)
Hi, I am making a game using "scrolling through a dungeon" example from the cookbook.

The problem I have is that I have a script which is supposed to go to a certain passage when a key is pressed (w=North, s=South and so on). The problem is that none of the keys work when I press them.

Here is the game file, the code is under "Map System"


1 Answer

0 votes
by (44.7k points)
The problem is that you have the wrong span IDs.  For example, "<span id="wAct">" should be "<span id="wKeyAct">".

Just add "Key" to those IDs and they work fine.

(Either that, or change the JavaScript to use "wAct" instead of "wKeyAct".)

Have fun!  :-)
by (2.9k points)
Thanks, if you're interested here is the almost finished game.