Difference between revisions of "GetPlayingBlob"
From King Arthur's Gold Wiki
Shadlington (Talk | contribs) (Created page with "<onlyinclude> Returns a reference to the CBlob with the given index in the list of blobs that represent currently active (i.e. spawned, not dead) players. </onlyinclude> <syn...") |
Shadlington (Talk | contribs) |
||
Line 1: | Line 1: | ||
<onlyinclude> | <onlyinclude> | ||
− | Returns a reference to the [[CBlob]] with the given index in the list of blobs that represent currently | + | Returns a reference to the [[CBlob]] with the given index in the list of blobs that represent currently living players. |
</onlyinclude> | </onlyinclude> | ||
<syntaxhighlight lang="cpp">[[CBlob]]@ getPlayingBlob(u32 index)</syntaxhighlight> | <syntaxhighlight lang="cpp">[[CBlob]]@ getPlayingBlob(u32 index)</syntaxhighlight> | ||
− | Similar to [[getBlob]], but because this is only for currently | + | Similar to [[getBlob]], but because this is only for currently living players, this can be useful for doing things to each player. |
Something like the following might therefore be useful: | Something like the following might therefore be useful: | ||
Revision as of 21:01, 14 August 2012
Returns a reference to the CBlob with the given index in the list of blobs that represent currently living players.
[[CBlob]]@ getPlayingBlob(u32 index)
Similar to getBlob, but because this is only for currently living players, this can be useful for doing things to each player. Something like the following might therefore be useful:
for ( int i = 0; i < [[getPlayingBlobsSize]](); i++ ) { [[CBlob]]@ blob = getPlayingBlob(i); // Do something to this player }