is there any way that you can have certain keys on your keybord take you to a another passge? for example:you press i to open the inventory,or c for a crafting menu.
I vaguely remember reading about a macro that did this in Sugarcane about a year ago... I'll wrack my brain and see if I can remember where... It might have just been someone else asking the same question, or talking about making their own script for it...
I have made a macro that allows you to press a key to go to a defined passage. But it doesn't seem to work when you put several macros on the same page. (The last one will only be considered)
The macro is : <<keycontrol "KeyInUppercase" "Passage Title">> ie: <<keycontrol "C" "CRAFT">>
The code :
(function() { var keyToPress; var passageToGo; var keyPressed;
function Init(params) { keyToPress = params[0]; passageToGo = params[1];
keyToPress = keyToPress.charCodeAt(0); }
function KeyCheck(e) { if(!e) var e = window.event; if(e) { keyPressed = e.keyCode; }
Comments
I have made a macro that allows you to press a key to go to a defined passage.
But it doesn't seem to work when you put several macros on the same page. (The last one will only be considered)
The macro is : <<keycontrol "KeyInUppercase" "Passage Title">>
ie: <<keycontrol "C" "CRAFT">>
The code :
What should I do with the macro?
(I'm terribly sorry, I'm new to both programming and Twine)
1) right click and create a SCRIPT PASSAGE.
2) copy and paste the code into the script passage.(not the script passge)
3) put the macro in a passge.
The macro is : <<keycontrol "KeyInUppercase" "Passage Title">>
ie: <<keycontrol "C" "CRAFT">>
thats all i know.