set blood volume||doc135496

September 20, 2022

Format

 Entity:setHp(hp) 
  • The class to which the function belongs:Entity

Description

Sets the health value of the entity object.


Precautions

  • If the set blood volume value exceeds the maximum blood volume value, it will become the maximum blood volume value

Parameters

Variable name type Description
hp float blood volume


Code Samples

on the entity servermount script, set the health value of the entity object to 20

this:setHp(20)