HAH YOU THOUGHT BOIIIII! I FIGURED OUT A WAY.
This is what worked!
if (typeof window.CustomScripts == "undefined") {
window.CustomScripts = {
updateVariable(inputName) {
// Get the value from the input textbox at time of click.
var value = $("input[name='" + inputName + "']")[0].value;
// Update the variable.
State.variables[inputName] = value;
}
};
};
^javascript
<center>(set: $attack to (either: "v", "b") + (either: "v", "b") + (either: "v", "b") + (either: "v", "b") + (either: "v", "b") + (either: "v", "b"))(set: $counter to 5)You have |amount>[$counter] seconds left!
$attack
(live: 1s)[ (set: $counter to it - 1)(if: $counter is 0)[(go-to: "Attacked!")](replace: ?amount)[$counter]]
<input type="text" name="fname" value="">
<button type="submit" onclick="CustomScripts.updateVariable('fname')">Defend!</button></center>
What is in the passage^
(if: $fname is $attack)[You take no damage!
](else:)[You got hurt!]
Passage 2^
This solves both my problems. While I still can't use ?fname I was able to bypass it. and I just realized you just pointed me to the forum I got this from.....oof....