Difference between revisions of "Osiris/API/IterateUsers"
From Divinity Engine Wiki
m |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* call '''IterateUsers'''(''(STRING)'''''_Event''') | * call '''IterateUsers'''(''(STRING)'''''_Event''') | ||
===== Description ===== | ===== Description ===== | ||
− | Throws a [[Osiris/API/UserEvent| | + | Throws a [[Osiris/API/UserEvent|user event]] for each [[Osiris/API/CharacterGetReservedUserID|user]] in the game. |
===== Notes ===== | ===== Notes ===== | ||
− | * No special event is thrown after the last user has been iterated. You can use [[Osiris/API/GetUserCount|GetUserCount]] in advance to record the number of users and decrease it every time you get a user event | + | * No special event is thrown after the last user has been iterated. You can use [[Osiris/API/GetUserCount|GetUserCount]] in advance to record the number of users and decrease it every time you get a user event. Note that users could join/leave while the events are still queued, so you may get events for users that just disconnected and miss events for users that just joined. If possible, it is better to rely on [[Osiris/API/CharacterReservedUserIDChanged|CharacterReservedUserIDChanged]] events. |
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/CharacterAssignToUser|CharacterAssignToUser]] | * [[Osiris/API/CharacterAssignToUser|CharacterAssignToUser]] | ||
Line 14: | Line 14: | ||
* [[Osiris/API/UserEvent|UserEvent]] | * [[Osiris/API/UserEvent|UserEvent]] | ||
− | [[Category:Osiris Calls]] | + | [[Category:Osiris Calls|IterateUsers]] |
Latest revision as of 16:22, 19 December 2017
Full Definition(s)
- call IterateUsers((STRING)_Event)
Description
Throws a user event for each user in the game.
Notes
- No special event is thrown after the last user has been iterated. You can use GetUserCount in advance to record the number of users and decrease it every time you get a user event. Note that users could join/leave while the events are still queued, so you may get events for users that just disconnected and miss events for users that just joined. If possible, it is better to rely on CharacterReservedUserIDChanged events.