Tile - YChargeable - Deplete – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
 
Line 35: Line 35:
----
----
{{Navbox/Ylands}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}


[[Category: Instructions]]
[[Category: Instructions]]

Latest revision as of 15:27, 24 November 2023

Deplete(Entity, Amount)

YlandsTile-135.png

static deplete(target: YEntity, amount: number): void;

Parameters

target

Target entity

amount

Amount of charge to be removed

Availability

Server

Description

Allows to decrease charge from target entity.

Notes

  • Works for "chargeable" items (e.g Mining drill).
  • Works also for engines.
  • Power cells cannot be recharged from a script, only depleted.
  • Entering negative number as amount will inverse the instruction effect.