Since engine version: 1.0 OC
Retrieves properties of a player by way of the name under which they are stored in the Game.txt component of a savegame.
any GetPlayerVal(string entry, string section, int player, int entry_number);
- Name of the entry to be retrieved.
- [opt] Section of the entry to be retrieved. If not specified, all sections will be searched for an entry of the specified name.
- [opt] Number of the player of which you want to retrieve an entry.
- [opt] Index of the value to be retrieved if an entry contains multiple values.
Warning: the retrieved values may not be synchronization safe, meaning they may differ from computer to computer in a network game. Using these values may cause sync loss in a network game.
Most useful applications for entry are already implemented in System.ocg/GetXVal.c.
Log("Player %d has %d objects!", player, GetPlrObjectsOwned(player));
Writes the number of objects owned by this player into the log file.