Tile - YEntity - Throw Entity – Ylands
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Stub}}" to "{{Wiki|stub}}") |
Lou Montana (talk | contribs) m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}") |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<!--- | |||
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE. | |||
--> | |||
== Throw Entity(Instigator, Entity template, Origin, Direction, Speed, Gravity, Damage, Damage type, Destroy on hit, On entity hit, On ground hit, On missed) == | |||
[[File:YlandsTile-637.png]] | |||
<pre>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;</pre> | |||
=== Parameters === | |||
==== instigator ==== | |||
Instigator of the throw (optional) | |||
==== entityTemplate ==== | |||
Entity template of the projectile | |||
==== origin ==== | |||
Origin of the projectile | |||
==== direction ==== | |||
Direction of the throw (vector) | |||
==== speed ==== | |||
Speed of the throw (m/s) | |||
==== useGravity ==== | |||
Whether the throw respect gravity | |||
==== damage ==== | |||
Amount of damage caused by the projectile | |||
==== damageType ==== | |||
Type of damage caused by the projectile | |||
==== destroyOnHit ==== | |||
Whether the projectile should be destroyed on hit | |||
==== onEntityHit ==== | |||
What should happen if an entity is hit | |||
==== onGroundHit ==== | |||
What should happen if ground is hit | |||
==== onMissed ==== | |||
What should happen if nothing is hit | |||
=== Availability === | |||
[[Ylands:Tile Availability - Server|Server]] | |||
=== Description === | |||
Throws a '''projectile''' spawned from the '''entity template'''. | |||
=== Notes === | |||
* Instigator will be listed as the source of the damage, if the throw hits something | |||
---- | ---- | ||
{{Navbox/Ylands}} | {{Navbox/Ylands}} | ||
{{DEFAULTSORT:{{#sub:{{PAGENAME}}| | {{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}} | ||
[[Category: Instructions]] | [[Category: Instructions]] | ||
Latest revision as of 14:27, 24 November 2023
Throw Entity(Instigator, Entity template, Origin, Direction, Speed, Gravity, Damage, Damage type, Destroy on hit, On entity hit, On ground hit, On missed)
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
Instigator of the throw (optional)
entityTemplate
Entity template of the projectile
origin
Origin of the projectile
direction
Direction of the throw (vector)
speed
Speed of the throw (m/s)
useGravity
Whether the throw respect gravity
damage
Amount of damage caused by the projectile
damageType
Type of damage caused by the projectile
destroyOnHit
Whether the projectile should be destroyed on hit
onEntityHit
What should happen if an entity is hit
onGroundHit
What should happen if ground is hit
onMissed
What should happen if nothing is hit
Availability
Description
Throws a projectile spawned from the entity template.
Notes
- Instigator will be listed as the source of the damage, if the throw hits something