Tile - YChargeable - Deplete – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "<!--- THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE. --> == Deplete(Entity, Amount) == File:YlandsTile-1...")
 
No edit summary
Line 10: Line 10:


==== target ====
==== target ====
Target entity


==== amount ====
==== amount ====
Amount of charge to be removed
=== Availability ===
[[Ylands:Tile Availability - Server|Server]]


=== Description ===
=== Description ===

Revision as of 11:16, 12 November 2021

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.