GetFirstPC()
Obtains the first PC
object GetFirstPC();
Description
Returns the first PC in the PC list in order to cycle through all PCs with GetNextPC().
Remarks
Useful for debugging purposes. If only one person is testing the module you can use SendMessageToPC(GetFirstPC(), "Something Happened") and the first (and only) PC will see that message.
Version
1.22
Example
// This function cycles through all PCs and counts how many there are void main() { int nPCs = 0; object oPC = GetFirstPC(); while (GetIsObjectValid(oPC) == TRUE) { nPCs = nPCs+1; // nPCs++; oPC = GetNextPC(); } }
See Also
functions: | GetNextPC |
categories: | Get Data from Creature Functions |
author: Tom Cassiotis, editor: Charles Feduke
Send comments on this topic.