1. How do I make a verb that will set a game mode? I can make it so there is a world message saying the mode, but I need it to affect the game, like move people to certain places and give certain players differnt attribtes. Could someone give me an example of that? I don't need anything too specific, just an example showing how something of that nature is done.
2. Job ratios- I need a team/postion.rank balance system. Could someone please give me a sample code showing how to make it when someone joins a team and chooses a position, their rank will be randomly selected, but if certain ranks are taken like a leader spot, only one person can have it. Same as aboce, just a general demo is required, please.
Thanks...
ID:168939
![]() Aug 12 2005, 11:29 am
|
|
var/global/varname Then acess the variable via
global.varname
As an example... var/global/mode As for your second question, i'm not really sure what you want, sorry, hope that helps. |
I would try something a little more like this.
Then you can use Holy's Login() code to change the world with the different mode locations, etc. |
Yeah, I was just giving a quick example of how to use global variables, but your example is good, Justin, have to any idea what he was asking with his second question? It confused me and now its bugging me.
|
It's hard to explain, he's talking about a randomized job select system. He wants probabibility coding to be able to pick a random job for people, but to return if a job such as group leader is already taken. The code he's asking for isn't difficult to make, now that I think of it.
|
Pretty much he needs lists for each job type, so it can load the list and check to see if the possition is taken?
Like... var/Jobname[10] Or am I still off target here? |
Well, you got the right idea but he wants it to be randomized as well.
var/pick=(rand(1,5)) That's my example, you don't have to use usr and it's just a rough example of what I think he's talking about. Sorry for the delay in the post, I had to go somewhere. |
Well then for what I can see he/she wants, he/she would need this too, right?
var/global/list/MachineGunner = new And so on, still needs lots of tweaks, but its not my game to code, its his/hers, so I'll just throw something through together for him/her to look at. |
Yes I did, like 5 times, lol.
EDIT: We've posted so many times I was too lazy to scan up and I had lost track of who origonally started this, besides, I have a korean girl on my AIM who has screen names of Bob, and character names in games along the same lines. |
Sorry I wasn't looking for the word pick itself I was looking for the outcomes of pick.
EDIT: If a wacky korean girl is going to use bob in her name and someone calls her male, that's her problem. It's better to assume the obvious and then get corrected if the obvious was wrong. |
You and me posting back and forths to each other turned a once tiny post, into a huge thread which I keep getting lost in x_x
Edit: I know your right, but as I said, I lost track of the origonal posters name anyways so I used both. Edit2: And if we wanted to go over the top... #define MAXRANK 10 //Can only be set at compile time, stopping any errors, but makes it easy to change something which is in multiple places |
I have a question, i need to know how to make damage mandatory to an attacking mob in an rpg. I have defend in there so the mob will take damage but it's optional to click on it. Please give me some help.
|
turf This is my job code. I think I need more help than just blindly asking for a demo. Is there anyway I can make ratios for these ranks? |
2.) Er.. I don't know how to do that at the moment.