Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Need help from JavaScript pros! [Twine 2 / SC]

$
0
0
Hey everybody,

lacking deeper knowledge of JavaScript I am facing a major problem here: For an educational game I want to include passages, in which the users have to drag and drop words into the right order. I found a script which covers about 90% of what I need, but I don´t know how to adapt it to make it work with twine / sugarcube.

I hosted an example here: http://deutschdetektiv.net/exp/put_words_in_order.html

Could anybody help making this work in Twine/SC?

I´d need the following changes:
    * instead of comparing the user result with the right answer and then displaying the <span id="correct!">, I´d like the user to drag and drop the words until they think they are in the correct order. * On clicking a button, the script shall compare the user sentence with the correct sentence (as stored in var content) and pass a boolean variable to Twine, which can be further processed within the passage. * Remove the <span class='exclamation' data-info='"+solution+"'>!</span>. I tried to do so myself, but the script stopped working.

I know this is a huge favor to ask, I can only hope that the feature might be handy for other users as well.

Viewing all articles
Browse latest Browse all 1844

Trending Articles