SetNPCHealth: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|SetNPCHealth(npc, health)}} {{FuncParameters}} {{FuncParam|npc|__EDIT_ME__}} {{FuncParam|health|__...")
 
No edit summary
 
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Set the NPC health.}}


{{FuncSyntax|SetNPCHealth(npc, health)}}
{{FuncSyntax|SetNPCHealth(npc, health)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|npc|__EDIT_ME__}}
{{FuncParam|npc|The NPC identifier.}}
{{FuncParam|health|__EDIT_ME__}}
{{FuncParam|health|The health in floating point value.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns nothing.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
SetNPCHealth(npcid, 100.0)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:NPCFunctions}}

Latest revision as of 15:20, 19 November 2019

SetNPCHealth

Type: Function
Context: Server
Introduced: v1.0

Description

Set the NPC health.

Syntax

SetNPCHealth(npc, health)

Parameters

  • npc
    The NPC identifier.
  • health
    The health in floating point value.

Return Value

  • This function returns nothing.

Example

SetNPCHealth(npcid, 100.0)

See also