Using The Comparison Branch

by RPGking (PM)

See everything made by this user or team.

Current Language: English
of 10 vote(s).
The comparison branch is a script that allows you to compare objects, items, and other various things. For example, I want to keep a zone blocked until a the "PO" gets to a certain level. So I use the comparison branch to make it so that if "PO" is level X, then unblock zone. 
Although it has no recognizable math features or expression, there are things linked to math. These are the expressions that you can use in the comparison branch.
greater than 
less than
greater than or equal (the expression used for the "PO" level/zone script. So if "PO" level is greater than or equal to, then unblock zone X)
less than or equal
Now to the feature of this tutorial. We are going to make a simple item buy script using the comparison branch.
1. Make a character called Bartender.
2. Edit him and tweak him to your liking then open the talked to option/script.
3. Make a message box that says the following: Bartender: Would you like a drink?
4. On the very same message box, make 2 options: Yes and No
5. Now make a comparison branch.
6. Add the following to each slot: In the first text-box click the little grey square, open party, then select money.
Then in the scroll-box provided, click greater than or equal to.
Then make the last text box type how much the drink should cost.
7. Click okay and then under the parent node that should say (if main. money is greater than or equal to X) make another script. This one should be the change money script. 
8. Make the money subtract from the "PO" how ever much the drink costed.
9. Under that, make a message box that says the following: Bartender: Thank you come again.
10. Now we go back to the comparison branches 2nd node, (if main. money not equal to X), under that node make a message box that says the following: Bartender: You don't have enough money.
THERE YOU GO! You did it, this is one of the many ways a comparison branch can be used. it can be used for everything and no game is truly complete without the usage of such a marvelous tool. 
Post any comments below. 

There's been a total of 1960 views(s).
There's been 1228 people that have viewed.