Okay what i want is when ever you choose prisioner it assigns you a cell #, but i don't want everyone having cell one, how can i make it where it sets it where like where i have Cell: 1 the next person would have Cell: 2?
so itd be like this
A logs in and makes a prisoner
A gets cell 1
B logs in and makes prisoner
B gets cell 2
ID:271470
Jul 11 2007, 4:54 pm
|
|
Jul 11 2007, 5:13 pm
|
|
Make an area for each cell, or use Block(), and check for a player mob.
|
var/cell = rand(1,3)//based on a coin toss, it's random from 1 to 3. |
In response to Jman9901
|
|
Jman9901 wrote:
> var/cell = rand(1,3)//based on a coin toss, it's random from 1 to 3. |
In response to Pyro_dragons
|
|
Pyro_dragons wrote:
Make an area for each cell, or use Block(), and check for a player mob. say what? Okay i got the area made... but this isnt exactly helping me figure out how to make the cell# go up from one. |
var/list/cells = new/list() I made cell a datum because I have no idea what all information you'll need each cell to have or what-not. That and I love datums. If you want anything else specific (ie: replace cells that have become empty due to logging out) you could have the New() check for a break in the numbers in the cells list. If you have any questions on anything else feel free to page me questions. |
In response to Delgertome
|
|
*sigh* It's really not that difficult....
area or you can use block() mob Again, probably easier and more efficient ways to do this, but this is what first comes to mind at 3am >_> |
In response to Pyro_dragons
|
|
You're requiring a lot of hardcoding here with little flexibility. And in your Login() you should use a for() loop for the areas. (Just put them in an array.) The best functions are the ones that adapt to your needs with as little added work as possible.
I'll admit my way does get a bit excessive because it uses datums for something he probably only touches a couple of times, but it also allows for more dynamic uses since I have no idea what the cells are going to be used for in the game. (Also datums are neat.) |
In response to Delgertome
|
|
The cells are going to be used for a verb to check waht cell the prisoner is in
|
In response to Black Wolf Production
|
|
i see... oh and one tip, if someone told you to jump into an ocean of fire where everyone that does burns alive and dies, would you?
and soz idk how to make it go up. |
In response to Jman9901
|
|
Jman9901 wrote:
i see... oh and one tip, if someone told you to jump into an ocean of fire where everyone that does burns alive and dies, would you? no, but ive seen you try to help and i see why people say don't listen to you. |
In response to Black Wolf Production
|
|
Because he's newbie at coding of course!
|
In response to LucifersHellion
|
|
that really dosn't take a whole lot of coding...and he was giving you a sketch
|
In response to Fautzo
|
|
well...Jman was
|
In response to Fautzo
|
|
all I asked for was how to make a number go up from 1 not a sketch or anything just a bas way to get a number to count up.
|
In response to Black Wolf Production
|
|
I'm not sure exactly how you want this, but heres one example:
var/global/cells = 0 Then you would have to make turfs with the tags; 1,2,3 etc. |