Difference between revisions of "TActivePlayer.Alive"
m (→Example) |
(→Example: Capitalized `Btye` for consistency. Condensed code making it easier to understand) |
||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
Access mode: RW | Access mode: RW | ||
==Description== | ==Description== | ||
− | + | If a player is alive or not. | |
==Example== | ==Example== | ||
<syntaxhighlight lang="pascal"> | <syntaxhighlight lang="pascal"> | ||
− | var i: | + | var i: Byte; |
begin | begin | ||
− | for i := 1 to 32 do | + | for i := 1 to 32 do |
− | + | Players[i].Alive := not Players[i].Alive; // causes player to die if alive, and respawn if dead | |
− | |||
− | |||
− | |||
− | |||
end; | end; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:TActivePlayer]] | [[Category:TActivePlayer]] |
Latest revision as of 14:54, 29 July 2013
property TActivePlayer.Alive: Boolean Access mode: RW
Description
If a player is alive or not.
Example
var i: Byte;
begin
for i := 1 to 32 do
Players[i].Alive := not Players[i].Alive; // causes player to die if alive, and respawn if dead
end;