Overview | Videos | Documentation | Demos | Integrations | API | Support

Doc Home > Items > Magic Item

The MagicItem component inherits from the Item component and allows the item to cast a magic spell when used. The MagicItem implements the IUesableItem interface and registers for the used callback so it knows when to cast the spell.

By default the spell will only apply a damage, but you can receive a callback to apply any game specific events. The spell can be casted continuously until the use event has stopped or once when the used event is fired. In addition, the shape of the cast can be linear or spherical.

Can Use In Air
Can the item be used in the air?

Cast Mode
Specifies how often the magic is casted

Cast Shape
Specifies the shape of the cast

Cast Rate
The number of casts per second

Cast Point
The point at which to do the actual cast

Cast Distance
The distance of the cast. Only used if the CastShape is linear

Cast Radius
The radius of the cast

Cast Amount
The amount of ConsumableItem to use for each item use

Target Layer
The layers that the cast can hit

Wait For End Use Event
Should the magic wait for the OnAnimatorItemEndUse to return to a non-use state?

Can Stop Before Use
Can the magic be stopped before the used method is called?

Continuous Min Use Duration
Minimum amount of time that the continuous item can be used

Regenerate Rate
The speed at which to regenerate the ammo

Regenerate Amount
The amount of ammo to add each regenerative tick. RegenerativeRate must be greater than 0

Cast Particles
Optionally specify any particles that should play when the magic is casted

Cast Sound
Optionally specify a sound that should randomly play when the magic is casted

Cast Sound Delay
If Cast Sound is specified, play the sound after the specified delay

Damage Event
Optionally specify an event to send to the object hit by the cast

Damage Amount
The amount of damage done to the object hit

Normalize Damage
If the cast hits multiple objects should the damage amount be distributed evenly across all objects?

Impact Force
How much force is applied to the object hit

Default Impact Sound
Optionally specify a default impact sound that should play at the point of the object hit. This is only used if no per-object sound is setup in the ObjectManager

Default Spark
Optionally specify any default sparks that should appear on top of the object hit. This is only used if no per-object spark is setup in the ObjectManager

<- Shootable Weapon
Melee Weapon ->