1) Make a custom item with a counter value of '0'
2) Go to the String Editor and open up the string with the Yes/No question
3) Use the '\12\X\X' function in the String Editor to change the custom item's counter value you created to '1'
4) Once that string goes off the screen (with the 'Messages Disappear' rule checked), the Script you have created will load a large FFC that looks like a text box with the Yes and No text in it (but in fact, the Yes and No will be only part of the FFC the script as loaded, and is not really a text, or text box for that matter, at all)
5) The player chooses the answer he wants to use (with an arrow or something, scripted, of course)
6) The script changes the counter value of the custom item to '0' again, and displays the string relative to the choice the player has chosen
Now, how will this script work? I think I may know. First, your script will have 3 arguments: One for the FFC, one for the string of the Yes answer, and one for the string of the No answer. The script will recognize when the counter of 'custom item' is over '0', and bring up the FFC (that looks like a normal text box with the text Yes and No already drawn inside). Then, the script will freeze all motion of the game, and place an arrow that will be in front of Yes until the player pushes 'Up' or 'Down' on the arrow keys, then the arrow will be placed in front of No. (like the player is selecting an answer)
Once the player hits Enter (or whatever the input key is), the script will read which answer the arrow was in front of, clear the FFC, and display the correct String!
Is that possible? Can you even give a custom item an actual counter value? (so I don't have to use rupees or bombs or anything like that)
Also, so it'll be more customizable, make it look like this and the arrow moves up and down (if you decide to jump right in... ):
/////////////////////////////////////////////////////////////////
///// --> Yes //////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
////////// No ///////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
That way, you could also have this, depending on how you draw your tiles used for your FFC:
/////////////////////////////////////////////////////////////////
///// --> Sword of Destruction /////////////////////////////
//////////////////////////////////////////////////////////////////
////////// Shield of Protection ///////////////////////////////
/////////////////////////////////////////////////////////////////
And you could have a string for each that would give you a special item or such! Here's a smidgen of code I made (just for convenience's sake ):
{
void run(int textbox, int onestring, int twostring)
{
while(true)
{
if(itemclass->Counter(7) > 0)
{
}
Waitframe();
}
}
}
Where 'textbox' is the Tile for the FFC, 'onestring' is the number of the string to be played if the first answer is chosen, and 'twostring' is the string to be chosen if the second answer is chosen. Hope that might help! (that's as far as I got ) Make sure to make the ''Arrow of Choice's" placement be relative to the coordinates of the FFC! Thanks, all!
NOTE: I updated 'std.zh' with:
const int CR_RUPEES = 1;
const int CR_BOMBS = 2;
const int CR_ARROWS = 3;
const int CR_MAGIC = 4;
const int CR_KEYS = 5;
const int CR_SBOMBS = 6;
//======================================================================
const int CR_YESNO = 7;
//======================================================================
But I am almost positive that's not how ZQuest works... Any suggestions? I thought that might work because the String Editor uses std.zh, right? So you'd put '\12\7\1'... wouldn't that work?
Edited by AgentLym, 10 July 2009 - 01:02 PM.