Missile

July 4, 2022

Missile

A Missile is a flyable object created by the Missile skill. When the Missile hits the target, it will trigger various set effects.

It is worth mentioning that,The Missile can have a solid model or no model, it is only used as a collision box for detection. Usually, Missiles are used as objects with flight trajectories such as bullets, shells, magic balls, etc., and the Missiles can also follow a Entity to move as the Entity’;s attack detection range.

Click below the Game Part panel New button, you can create a new Missile template.

Missile template: The missile template specifies the Property of the missile, and the missile template is edited in the editor.
Missile instance: When creating a missile in the game, each individual missile created is an instance of a missile created based on a template.

Basic properties

Property Function
Missile name The name of the Missile template, the nameDisplay name as Missile only, when calling skills through code, etc., you need to use the id of the Missile (right-click on the Missile template and select ”;Copy id”; to get the id of the Missile).
Missile Model Type No Model: Missiles are ”;invisible”; and have no solid model.

Model: Select the mesh model as the Missile’;s appearance.

Blocks: Select blocks as the Missile’;s appearance (selectable only for block items).

collider Sets the shape and size of the collider. Note: Missiles are According to the collision box to determine whether to hit the target, rather than judging from the model of the Missile.
maximum flight speed Sets the maximum flight speed of the Missile after launch, in m/s.
acceleration Sets the acceleration of the Missile after launch, in m/s².

When the acceleration is not equal to 0, the Missile will accelerate from 0m/s until it reaches the maximum flight speed.

When the acceleration is equal to 0, the Missile will fly directly at the maximum flight speed without acceleration.

Gravitational acceleration Sets the gravitational acceleration of the Missile in m/s².

When the gravitational acceleration is not equal to 0, the Missile will fall down due to the gravitational acceleration, which can make the Missile perform a parabolic motion.

spin speed Sets the speed at which the Missile rotates around the Y axis when the Missile is flying.
followable target Sets whether the Missile will follow the target Entity after being fired.

Lifecycle properties

Property Function
Existence time Set the survival time of the Missile, which refers to how long it takes for the Missile to enter the dying state after it is launched.
death time Set the delayed destruction time after the Missile enters the dying state, which is generally used to play special effects when it is dying.
demise display Sets whether the Missile will remain visible after entering the dying state.

Properties of the Missile at launch:

Property Function
sound effect on launch Sets the sound to play when the Missile is fired.

Hearable only to self: If the Entity that fired the Missile is a player Entity, the sound can only be heard by the player.

Loop: Set whether to automatically loop the sound effect.

Volume: Set the volume of the sound when playing the sound effect.

Audio: Set the sound effect file to be played.

special effects on launch Set the special effect played when the Missile is fired, the special effect will follow the Missile.

Only once: Sets whether the effect is played only once.

Limit time: Set whether to limit the playback time of special effects.

Effect Time: The playing time of the effect.

Effect launch position: Set the coordinate offset value of the effect relative to the Missile origin.

Effect launch angle: Set the angle at which the effect rotates around the Y axis.

Properties of the Missile on hit:

Property Function
Max hits Enabled: Sets whether to limit the number of times the Missile hits blocks or Entitys. If checked, the Missile will die prematurely when it hits the maximum number of blocks or Entitys. If unchecked, the Missile will only die after its survival time expires.

Total Hits: The Missile will die when the number of blocks hit by the Missile and the number of times the Missile hits equals this value. the property Only works on block items

Hits per Entity: When the number of times the Missile hits the Entity is equal to this value, the Missile dies.

Block Hits: When the number of times the Missile hits the block is equal to this value, the Missile will die. the property Only works on block items

hit Entity type No Collision: Missiles will penetrate the Entity and will not trigger a hit event.

Any Entity: Missiles can hit any Entity and trigger a hit event.

Target Entitys Only: Missiles can only hit target Entitys and trigger a hit event.

time interval between consecutive hits Minimum time between Missiles hitting the same Entity.
Hit a Entity to trigger Sets the skill that the Missile releases after hitting the Entity, for example, it releases a damage skill after hitting the Entity, causing damage to the hit Entity.
Hit Entity sound Sets the sound that the Missile plays when it hits a Entity.

Hearable only to self: If the Entity that fired the Missile is a player Entity, the sound can only be heard by the player.

Loop: Set whether to automatically loop the sound effect.

Volume: Set the volume of the sound when playing the sound effect.

Audio: Set the sound effect file to be played.

Hit Entity effects Sets the effect that the Missile plays when it hits a Entity.

Only once: Sets whether the effect is played only once.

Limit time: Set whether to limit the playback time of special effects.

Effect Time: The playing time of the effect.

Effect launch position: Set the coordinate offset value of the effect relative to the Missile origin.

Effect launch angle: Set the angle at which the effect rotates around the Y axis.

hit block type No Collision: Missiles will penetrate blocks and will not trigger hit events. the property Only works on block items

Disappear on Collision: When a Missile hits a block, it disappears without triggering a hit event.

Bounce After Collision: When a Missile hits a block, it will be bounced without triggering a hit event.

Prohibition After Collision: When a Missile hits a block, it will stop and no hit event will be triggered.

Trigger hit event only: When the Missile hits a block, only the hit event is fired.

Hit the block to trigger Sets the skill the Missile releases after hitting a block. the property Only works on block items
Hit the block sound effect Sets the sound that the Missile plays when it hits a block. the property Only works on block items

Hearable only to self: If the Entity that fired the Missile is a player Entity, the sound can only be heard by the player.

Loop: Set whether to automatically loop the sound effect.

Volume: Set the volume of the sound when playing the sound effect.

Audio: Set the sound effect file to be played.

Hit the block effect Sets the special effect to play when the Missile hits a block. the property Only works on block items

Only once: Sets whether the effect is played only once.

Limit time: Set whether to limit the playback time of special effects.

Effect Time: The playing time of the effect.

Effect launch position: Set the coordinate offset value of the effect relative to the Missile origin.

Effect launch angle: Set the angle at which the effect rotates around the Y axis.

Properties of the Missile when it dies:

Property Function
Triggered on death Sets the skill the Missile releases when it dies.
death sound Set the sound effect to be played when the Missile dies. Note that if the Missile’;s demise time is too short, the Missile may be destroyed before the sound effect ends.

Hearable only to self: If the Entity that fired the Missile is a player Entity, the sound can only be heard by the player.

Loop: Set whether to automatically loop the sound effect.

Volume: Set the volume of the sound when playing the sound effect.

Audio: Set the sound effect file to be played.

Death effect Set the special effect to be played when the Missile dies. It should be noted that if the demise time of the Missile is too short, the Missile may be destroyed before the special effect ends.

Only once: Sets whether the effect is played only once.

Limit time: Set whether to limit the playback time of special effects.

Effect Time: The playing time of the effect.

Effect launch position: Set the coordinate offset value of the effect relative to the Missile origin.

Effect launch angle: Set the angle at which the effect rotates around the Y axis.

Edit Events

Property Function
Edit Events Use visual programming to edit the event logic of the missile, see Missile Trigger Edit for details.