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 (37.1k 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.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.