Announcement

Collapse
No announcement yet.

I Will Explain Variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I Will Explain Variables

    OK, variables may seem intimidating at first, but once you get to know how to do them, your game will improve by a lot.

    First, make an event. (Usually invisible or NPC events) Next, edit the event and make a Value Conditional Branch. (Select option 2, 3, 4 depending on how many branches you want) When you do this, a screen will pop up and at the bottom it will look like this; (I will use option 2 for the example)

    123... 0
    123... 0

    When this screen comes up, make the top a number (example; 0) and make the bottom another number. (example; 1)

    Now, you may be wondering what these numbers are for. The top number will be the top branch's variable. (What happens when shared variable is zero) The bottom number will be the bottom branches variable. (What will happen when shared variable is one)

    How do you make the shared variable change to one? This is how;

    First, make a seperate event. Let's say... a boss fight. When you make the event for the boss fight, somewhere in there should be a Battle Result Branch. In the win section of the branch, put everything you need to. After that, at the very bottom of the win branch, put add variable. Change it from # to #. (example; 0 to 1. This will make sure that after the fight, the shared variable number will raise by one) Then, go back to your other event. (The one with the Value Conditional Branch) On the top branch, put what you want the NPC to say before you beat the boss. (example; Go fight the demon.) On the bottom branch, put what you want the NPC to say after you beat the boss. (example; You beat the demon and saved the world!)

    Now you know how to make variables, go try it out now!
    Currently working on: The Lost Realm
    (For more info plz PM me)

    #2
    Re: I Will Explain Variables

    Finally. Now the new guys can look at this instead of asking yet another "variables confuzzle me" question.

    Comment


      #3
      Re: I Will Explain Variables

      Yea. Plus I noticed that no one gave them real answers to their question. That's why I made this thread. (If this helped you any, please post saying that it did)
      Last edited by Linkman712; 07-22-2007, 07:59 PM.
      Currently working on: The Lost Realm
      (For more info plz PM me)

      Comment


        #4
        Re: I Will Explain Variables

        I guarentee you that people will still frequently ask this question.
        "What if like...there was an exact copy of you somewhere, except they're the opposite gender, like you guys could literally have a freaky friday moment and nothing would change. Imagine the best friendship that could be found there."

        Comment


          #5
          Re: I Will Explain Variables

          Yea, well it might lower the number of them. It would lower the number even more if it was a sticky thread.
          Currently working on: The Lost Realm
          (For more info plz PM me)

          Comment


            #6
            Re: I Will Explain Variables

            Can you also raise the variable in a treasure event instead of a boss one, like someone wants something and if you get it(treasure event), they'll join you or give you something when you see them again. In treasure events, I see the number 123...0, but it says trap damage next to it. I set up an event where when you open the chest you get a treasure item, but how do I make the number change so that the person who wanted the item does what they are supposed to do? Basically, how would a quick event be set up where you have to find an item for someone and they say thanks and then do something like join you or just say thank you after you've got what they wanted?

            Comment


              #7
              Re: I Will Explain Variables

              Linkman712, the more people who try and explain variables the better because everyone has a different style of learning, so cool.
              Crimson Knight had a great post a couple of years ago.
              http://www.pavilionboards.com/forum/...72&postcount=1

              animefan1980, Here's a good thread by History Major that can give some good insight into fetch quests and variables. (It's an old one, so it's probably better not to bring it back to life, but it has good info in it, nonetheless.)
              http://www.pavilionboards.com/forum/...ead.php?t=5966
              Last edited by Pagerron; 07-24-2007, 10:57 PM.
              " I am the way, the truth, and the life. No one comes to the Father but by me. " - Jesus

              Comment


                #8
                Re: I Will Explain Variables

                Originally posted by Linkman712 View Post
                OK, variables may seem intimidating at first, but once you get to know how to do them, your game will improve by a lot.

                First, make an event. (Usually invisible or NPC events) Next, edit the event and make a Value Conditional Branch. (Select option 2, 3, 4 depending on how many branches you want) When you do this, a screen will pop up and at the bottom it will look like this; (I will use option 2 for the example)

                123... 0
                123... 0

                When this screen comes up, make the top a number (example; 0) and make the bottom another number. (example; 1)

                Now, you may be wondering what these numbers are for. The top number will be the top branch's variable. (What happens when shared variable is zero) The bottom number will be the bottom branches variable. (What will happen when shared variable is one)

                How do you make the shared variable change to one? This is how;

                First, make a seperate event. Let's say... a boss fight. When you make the event for the boss fight, somewhere in there should be a Battle Result Branch. In the win section of the branch, put everything you need to. After that, at the very bottom of the win branch, put add variable. Change it from # to #. (example; 0 to 1. This will make sure that after the fight, the shared variable number will raise by one) Then, go back to your other event. (The one with the Value Conditional Branch) On the top branch, put what you want the NPC to say before you beat the boss. (example; Go fight the demon.) On the bottom branch, put what you want the NPC to say after you beat the boss. (example; You beat the demon and saved the world!)

                Now you know how to make variables, go try it out now!
                You helped me....sorta. I am still confused on how to make (for instance) you give 4 items to a NPC and then after the value is 4 then have another event triggered. My biggest problem is actually locating the variuble menu (I know stupid) but I can't seem to find it.
                Kamekaze

                Comment


                  #9
                  Re: I Will Explain Variables

                  Oh yes ^_^ Dusk Raven, I did post a thread about veriubles, but I didn't say confuzzle.
                  Kamekaze

                  Comment


                    #10
                    Re: I Will Explain Variables

                    I don't think that was directed at you. I could be wrong though.
                    Warning: Make sure brain is active before putting keyboard into gear.

                    Duct tape is like the Force. It has a Light side and a Dark side, and it holds the universe together.

                    Comment


                      #11
                      Re: I Will Explain Variables

                      Originally posted by kamekaze77 View Post
                      My biggest problem is actually locating the variuble menu...
                      You change variable values under Propery Control, and use modify, increase, or decrease variable values here.

                      Basically, let's say an NPC wants you to find three magical pieces of raccoon fecal matter for him. You would first make a Val Cond branch, under Control, and make it have four branches. Select a variable you want to use (you can use either shared or internal...there really is no benefit to using one over the other, besides maybe organizing things for yourself-write down all variables you use and what they do in a notebook!!! I cannot stress this enough!!!); let's say you're going to use Shared Variable 1. Then, in the branch, make Shared Variable 1 equal to 0, 1, 2, and 3.

                      Now let's go to the events where you find the fecal matter. Let's say you find it in a barrel. Make a barrel a button event, and when you click on it, have the dialogue box say something like, "You have acquired the mystical powers of the raccoon feces!" or whatever, and then in another line of code within that mode, go to Property Control, under Increase Shared Variable, and select Shared Variable 1. Then set the value to 1 (meaning it will increase by one). Now Shared Variable 1 should equal 1.

                      Go to the next event, say an NPC. Do the same thing. Make a dialogue box saying you have received the exalted poop, and then increase the variable again using the method discussed above. Now Shared Variable 1 should equal 2. Do this a third time, and now the variable will equal 3.

                      Now go back to the Val Cond branch at the beginning. Remember you made 4 branches, with Shared Variable 1 equalling 0, 1, 2, and 3? These represent how many pieces of feces you have found. Under Shared Variable=0, type a dialogue box saying something like, "You have not found any fecal matter yet. Begone with you!" Under Shared Variable=1, make a dialogue box saying, "You've only found a single solitary piece of raccoon droppings. Come back when you have two more." Under Shared Variable 1=2, do the same thing, but say something about needing to come back after finding one more. Then after Shared Variable 1=3, say, "You have found all that I have asked of you. Due to your pockets reeking after having carried all that fecal matter around the countryside with you, I will reward you with this treasure item." or whatever. If you want, you can make another variable at this point if you need to "prove" that you have received the NPCs blessing. Make Shared Variable 2 equal to 1. Then, when you go talk to another NPC or whatever, make a Val Cond branch with two branches. Shared Variable 2=0 or=1. When it's equal to 0, the NPC will know you didn't talk to the first guy after gathering all the feces. When it's equal to 1, that means you've already talked to him and turned in all the feces.




                      Hope that helps.

                      Also, Kamekaze (sic), try to avoid double posting. It's generally frowned upon...if you have something else to add to your original post, you can edit it and add what you need to.
                      Last edited by Perversion; 07-25-2007, 07:03 PM.

                      Comment


                        #12
                        Re: I Will Explain Variables

                        Heh, nice choice of an example item Perversion.
                        Warning: Make sure brain is active before putting keyboard into gear.

                        Duct tape is like the Force. It has a Light side and a Dark side, and it holds the universe together.

                        Comment


                          #13
                          Re: I Will Explain Variables

                          Yea, because since I left out information about doing variables with items, I was going to start another thread. Thanks to you, I don't need to anymore. People can just look at this.
                          Currently working on: The Lost Realm
                          (For more info plz PM me)

                          Comment


                            #14
                            Re: I Will Explain Variables

                            Originally posted by animefan1980 View Post
                            In treasure events, I see the number 123...0, but it says trap damage next to it. I set up an event where when you open the chest you get a treasure item, but how do I make the number change so that the person who wanted the item does what they are supposed to do? Basically, how would a quick event be set up where you have to find an item for someone and they say thanks and then do something like join you or just say thank you after you've got what they wanted?

                            (Sorry to double post, I just wanted to give an answer to person that doesn't require following a link) Well, first things first. Make the person you want to join the party after getting two items. At the bottom of one of the screens, there should be a button that says something like, Event Editor. Press the button, and a new page should come up. At the top, it will have a bar that says new. If you click on it, you need to click control and find Value Conditional Branch. Choose, let's say, Option Three. (Now you'll have three branches)

                            A screen should come up. At the bottom, it will look like this;

                            123...0
                            123...0
                            123...0

                            (That's probably where you got confused) OK, now you make the top number, for example, 0. Make the number in the middle 1, and the bottom 2. Now, create your items. Place them where ever you want to put them. Go into the event editor of one of them, and go to property control. Change the shared variable to one. OK, now do the same for the other item except change the shared variable to 2.

                            Go back to the person who joins your party. Now, go to the event editor, and at the top branch, (Remember the Value Conditional Branch? This is it) Put message display, and make them say something like "Go find the items." On the middle branch, make him say "You found one of the two items." On the bottom branch, make him say "You found both of the items! Now I'll join you on your quest." Now, at the bottom branch, right under "You found both items! Ect. ect. ect..." go to party control. Somewhere in there should be an option that lets you add a character to your party. Clck on it and put in the character you want to add. Then, I'm not sure this'll work, but I think you can make the person dissapear after they join your party. I know you can with some events, but I'm not sure about characters. Just search through some of the things you can do and find something that lets you make the event dissapear.
                            Currently working on: The Lost Realm
                            (For more info plz PM me)

                            Comment


                              #15
                              Re: I Will Explain Variables

                              Is posting links really a bad idea in your opinion, Linkman? There's no sense in reinventing the wheel, as far as I'm concerned. I think it is a great idea to have a thread like this dedicated solely to variables. Having links to other variable threads can only make it more credible, especially since no thread regarding variables has ever been stickied in the Workshop. I don't think it takes anything away. Anyway...

                              To add to the info here, to those using variables, make sure that you write down the variables and their variations in a notebook so that you can keep track of them easily and efficiently.

                              (Sidenote: As far as a person disappearing after joining your party, that will happen automatically, so there's no need to worry about making the character disappear yourself. Once the character joins you, he/she is no longer in the town/dungeon.)

                              May this thread live long and help many.
                              " I am the way, the truth, and the life. No one comes to the Father but by me. " - Jesus

                              Comment

                              Working...
                              X