I have a proc so far which sends up to a party of 3 into a battle, my next step is creating a list inside the proc which determines who goes first by looking at all the mob's speed variable. How would i go about creating this? I also would like to know how to access the list to find the next player in the list so i twill brin gup his turn.
Thanks in advance.
-Tazor
ID:168951
Aug 10 2005, 7:10 pm
|
|
Aug 10 2005, 7:34 pm
|
|
I would also like to know how this works.
|
Ok. Your mistake here is creating a list that's local to the proc. The list wont exist after the proc is done and you wont be able to access it from another proc even while it still exists (unless you specifically pass the list on to another proc).
If you want to make a turn based battle system it's best to use datums. Datums are pretty much objects (like area, turf, obj, mob, etc) but can't be placed on the map, and only contain a few built in vars/procs. They're data objects (that's where the name comes from). We can store/access/manipulate a bunch of data very easily by placing it in datums. A basic turn based battle system's datum would look something like this. battleDatum |
In response to DarkView
|
|
where would the checking the player's speed to see who goes first go?
|
In response to Tazor07
|
|
It runs list in order, but it doesnt run by who has the the higher speed variable.
|