set hunger||doc135498

September 20, 2022

Format

 Entity:setVp(vp) 
  • The class to which the function belongs:Entity

Description

Sets the starvation value of the entity object.


Precautions

  • If the set hunger value exceeds the maximum hunger value, it will become the maximum hunger value

Parameters

Variable name type Description
vp float Hunger value


Code Samples

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

this:setVp(20)