Tile - YEntity - Throw Entity – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search

Throw Entity(Instigator, Entity template, Origin, Direction, Speed, Gravity, Damage, Damage type, Destroy on hit, On entity hit, On ground hit, On missed)

YlandsTile-637.png

static throwEntity(instigator: YEntity, entityTemplate: YEntityTemplate, origin: YVector3, direction: YVector3, speed: number, useGravity: boolean, damage: number, damageType: YDamageType, destroyOnHit: boolean, onEntityHit: (entity: YEntity, hitPosition: YVector3) => void, onGroundHit: (hitPosition: YVector3) => void, onMissed: () => void): void;

Parameters

instigator

entityTemplate

origin

direction

speed

useGravity

damage

damageType

destroyOnHit

onEntityHit

onGroundHit

onMissed

Description

Throws a projectile spawned from the entity template.

Notes

  • Instigator will be listed as the source of the damage, when the throw hits something