Well, I'm making a game, and I want the enemies to get harder with more people logged on (kindof like Diablo).
I just need to know a code to count the number of users logged onto the world at the moment.
thanks in advance.
ID:173314
Jan 20 2004, 5:11 pm
|
|
Well, we'll need to use a proc for this. A proc is a section of code that can be called by typing something like this:
player.IamAProc(some stuff)
In this example, player would be what is "calling" the proc. Calling is the term used for when the proc gets, well, called, executed, run, or what have you. IamAProc is the name of the proc, and the parenthesis, and the stuff inside is used to send some information to the proc. Like say...
player.Damage(50)
Then you could write the damage proc to take that 50, or whatever other number it might be, and do that much damage to the player.
Anyways, on with the question. The proc we would use in this instance is very simple.
Now that the proc is all done, copy and paste it into your code. Now we have to insert it someplace in your code for it to work. I'll display a simple verb that will show how many players are online, I will also show another variation of the verb to show you a different method of doing things.
Hopefully you can see how to use this, and good luck with your game.
~Polatrite~