View Single Post
 
Reply
Posted 2006-02-18, 11:22 AM in reply to KittenRat's post starting "Thank you very much. I was thinking..."
KittenRat said:
Thank you very much. I was thinking about having ten missions per area.

Then it's just easier to do this (this is where you would assign the mission).

There are 4 states to a mission, represented by a single variable:

0: Not started
1: Started
2: Complete
3: Complete, got reward

Code:
(This assumes that there are other missions in other towns, and starts at 9)

<> Comment ================================
<> Label: 1
<> Show Choices: Mission9/Mission10/Mission11/Next Page
: Mission9 Handler
   <> Branch if Variable [6509:Mission9 State] = 0
      <> Message: Something about DO THIS MISSION FOR THE CHILDREN
      <> Message: Do you accept?
      <> Show Choices: Yes/No
      : Yes Handler
         <> Message: Okay then!
         <> Set Switch [1001: Mission for SUPERTOWN] ON
         <> Set Variable [6509:Mission9 State] = 1
      : No Handler
         <> Message: Sorry to hear that!
         <> Jump to Label: 6
      : End
   : Else Handler
      <> Message:  You have already taken this mission!
   : End
: Mission10 Handler
   <> Basically the same as mission9, just with a different variable for 
   <> the current mission/different text/etc
: Mission11 Handler
   <> Basically the same as mission9, just with a different variable for 
   <> the current mission/different text/etc
: Next Page Handler
   <> Jump to Label 2
: End
<>

<> Comment ================================
<> Label: 2
<> Same as the first page.  New missions, though, and the 
<> next page jumps to Label 3 

<> Comment ================================
<> Label: 3
<> Same

<> Comment ================================
<> Label: 4
<> Same

<> Comment ================================
<> Label: 6
<> Message:  Goodbye!  

(This would be the end of the event code)

Note that I use 6 to exit - it could be 9 or whatever you want, just so long as it's at the end.

And this is where you get your rewards (This would all be in a COMMON EVENT that you call):

Code:
<> Branch if variable [6509:Mission9 State] = 2
   <> YOU WIN WHATEVER
   <> Set switch [6509:Mission9 State] = 3
: End
<> Branch if variable [6510:Mission10 State] = 2
   <> YOU WIN WHATEVER
   <> Set switch [6510:Mission10 State] = 3
: End
..And so on, for each mission in each area. Easy enough, you only have to set up the rewards section once (since it's a on-call COMMON EVENT), and the use of variables saves you a TON of branching and switch names.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube