Jump to content

Photo

It's 3:24 A.M. now...


  • Please log in to reply
No replies to this topic

#1 Eragon615

Eragon615

    Junior

  • Members
  • Real Name:Clayton
  • Location:Texas

Posted 11 July 2010 - 03:44 AM

Okay, so I had an idea for a script that would help a lot of us. I know some people have requested a yes/no answer script. I think I know how to make it work. I could probably script it myself even, but why waste weeks on what you guys could probably finish in minutes? That said, I'm not entirely sure this'll work...

So, this would work as several parts. First, I can see loads of options here, I'll start with the most complex ones. Create several misc/sprites. An A button, B button, the words Yes, No, and any custom words. (If you're clever, you probably see where I'm going already.) Now, create a bool. If A is pressed, return true or 1, b returns false or 2. Obviously need screen freeze and stop movement and stuff too. Now for further demonstration, I'm going to use a generic script. The basic signpost. It goes as normal until just after the Screen->Message part, then adds the Bool checkanswer. If 1 play message d1, if 2, play d2. This is assuming d0 is the first question, then d1 and 2 are the responses. You could use other arguments to choose the sprites for the yes and no, thus allowing custom choices, or just hard-code yes and no. It could be great for more advanced shops (i.e. get a description then choose weather or not to purchase), minigames (40 rupees to try, would you like to play? yes, no), trading games (Trade my X for your Y? yes, no), story parts (Try to pull the Master Sword? yes, no) or even just talking to people (Have you heard about so-and-so? yes, no).

The only draw backs I can see are,

1. Since I dunno how you could detect for longer custom answers, you'd have to fit the choice into a single 16x16 sprite,
2. Only 2 choices can be picked unless someone codes in more buttons, and
3. Since the message would play then give you the choice, if you didn't read the message well, you may not know what to answer.

Surely you all see the use of this script! Someone want to tackle it? Oh, and sorry if I was any bit unclear, as I said, it's 3:44 A.M. now... haha


Okay, some detail I should have included last night.

The code should work something like this:

CODE
ffc script cranegamestarter
//detect if A is pressed near the NPC.
Screen->Message [12]
//call the function for yes no answering
if answer = 1
   check rupees
   if enough
   start game
   else screen->message [Notenoughrupees]
else if answer = 2
   screen->message [comeagain]


You follow? It should be callable with a simple command, and include it elsewhere. (That makes it a function? Or maybe part of global slot 2?)

Edited by Eragon615, 11 July 2010 - 02:59 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users