Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → GetPlayerID()?
GetPlayerID()?
2002-02-21, 3:06 PM #1
I heard about this verb awhile back, but I never heard whether it works or not...anyone know?

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2002-02-21, 4:43 PM #2
I think you mean GetPlayerNum(), there's no such verb as GetPlayerID().

GetPlayerNum(player); gets the number of that player when he joined. So if he's the third person to join, it's 2. (it starts at 0, and that is the host)

GetPlayerThing(playernum); will get the thing number of the player.

Both of these verbs are useful with GetNumPlayers(); because with all of these three verbs used in a cog, JK has a built in array of players. [http://forums.massassi.net/html/smile.gif]

------------------
-Hell Raiser
Something Wiccan this way comes...
"Free, your, mind." - Morpheus, The Matrix
Cogging Guru for DBZ: TDiR
-Hell Raiser
2002-02-21, 5:35 PM #3
Hmm...

So would this work to get a random player ID? *goes off to test*

r = rand();
num = GetNumplayers();
GetPlayerNum(r * num);

Yup...it works...or at least it does solo. I have to test it with someone else.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz

↑ Up to the top!