![]() |
||||||||||||||
|
||||||||||||||
blade2k
» articles & tutorialsActive Time Bar in cbs
There are two ways (probably more, i don't care) that you can give each character an active time gauge. 1. 4parallel process events handling one character each. 2. 1 parallel process event handling all 4of them. Option two would reduce the amounts of events operating a time which would be more efficient and reduce lag, but since these parallel processes don't really make any noticable lag and the 4way event is easier to do (and runs more realistically), i'll discuss the 4event one right now. In either case, you will need 4 variables (one for each party member) to keep track of their gauge numbers. Name them “Gauge var1” “Gauge var2” etc. First of all, you'll need to know how many characters you have in your party so you know how many of the 4 'party' gauges are to be running. This can be done by setting a variable to the 'party size' option. Click on the tab 'change variable', select the variable you want to assign this value to, in the set box click on 'set', and in the operand box click on 'other' >>> party size. Next we use this to make sure the gauges for characters not in your party will not be running. Make 4 new event (common event), and name them "Gauge 1" "Gauge 2" "Gauge 3" "Gauge 4." The start conditions will be parallel process. Now, in the area for the code, put a wait command of about .5 seconds (or more if your computer sucks and can't handle too much going on at a time), and then put a fork command to test if the Party size variable is less than or equal to than the gauge #. For example, in "Gauge 1," you test if Party size is 'below' 1, and for "Gauge 2" you test if Party size is 'below' 2 etc. In the else case, put a wait of 10 seconds or whatever, to reduce lag. What this will do is, every .5 seconds it will test to see if the character present, and if it is, it will execute what is inside the fork statement (which is nothing so far), and if the character is not present, it will simply wait another 10 seconds (or however much you put) before testing again. Inside the fork statement, you now need a nested fork statement to test if the character is dead or not. We don't want dead characters moving do we? You can do this by creating a new fork statement, pressing on the '2' tab, click on 'Hero', choose your hero, and then for the hero condition, make it "Hp = 1 above." For the else statement, put another wait command or something :) . If your party members aren't going to all be in the same order, this fork will be done differently (you should probably use variables for each party member and assign each variable to a certain character to know which character needs to be tested), but i don't want to go into that right now. After testing if they're dead, comes the easy part, just incrementing their action gauge! Here you have the freedom to do mostly what you want, in this tutorial i'll presume the maximum for your gauge is 1000. So inside the fork statement, you can increment your character by changing your Gauge #var variables (the # stands for the party member). When you do so, change the set style to +, and the operand to ‘set’. In the operand set window, you can put a number, this number will decide the speed of your character. For example, if you put 20, it will increment the character’s gauge by 40 every second, if you put 15, it will increment it by 30 each second, obviously the 20 is faster. Make sure to make your faster characters have a higher number value in here than your other characters. After the basic speed of your character, you can account for status ailments by first testing to see if they are inflicted by one (haste, slow, whatever), and if they are inflicted, you can modify the gauge increment accordingly. ( plus or add more depending on if they’re slowed or not). You can also test for items on the character if you’d like, and change the increment as well. All this is merely a skeleton, you should change it as you please and make sure it works properly for the type of cbs you’re using. Hope you can make something out of my discombobulating jabbering, and I hope you had a better time reading this than I had writing it :D . |
|
|||||||||||||
|
©2002-2008 blade2k.net - parsed in 0.002 seconds - view active users
[16010 members][newest member: Markaz]
Active Users (1)[ cima55 ]
|
||||||||||||||