PlayerArmorPoints: Difference between revisions

From Zandronum Wiki
(Created page with "{{Template:ACSWarning}} int '''PlayerArmorpoints''' (void) ==Usage== This function will return the amount of armor points the activator of the script has. If the activator i...")
 
No edit summary
Tag: Source edit
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Template:ACSWarning}}
{{Template:ACSWarning}}
int '''PlayerArmorpoints''' (void)
int '''PlayerArmorPoints''' (void)


==Usage==
== Usage ==
 
=== Return value ===
This function will return the amount of armor points the activator of the script has. If the activator is World it will still return zero.
This function will return the amount of armor points the activator of the script has. If the activator is the server it will return zero.
 
==Examples==


== Examples ==
<syntaxhighlight lang="c" line="1">
<syntaxhighlight lang="c" line="1">
Script 1 (void)
Script 1 (void)
{
{
     Print(s: "You have ", d: PlayerArmorpoints(), s: " armor!");
     Print(s: "You have ", d: PlayerArmorPoints(), s: " armor!");
}
}
</syntaxhighlight>
</syntaxhighlight>


[[category:ACS Functions]]
== See also ==
* <code>{{Zdoomwiki|CheckInventory}}("Armor")</code> can be to achieve the same thing.
 
[[category:ACS functions]]

Latest revision as of 01:31, 3 July 2022

This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports.

int PlayerArmorPoints (void)

Usage

Return value

This function will return the amount of armor points the activator of the script has. If the activator is the server it will return zero.

Examples

Script 1 (void)
{
    Print(s: "You have ", d: PlayerArmorPoints(), s: " armor!");
}

See also