Click or drag to resize

LightningSpellScript Fields

The LightningSpellScript type exposes the following members.

Public fieldCollisionAudioClips
Collision audio clips. One will be chosen at random and played one shot with CollisionAudioSource.
Public fieldCollisionAudioSource
Collision audio source
Public fieldCollisionForce
The force to explode with when there is a collision
Public fieldCollisionForceMode
Collision force mode
Public fieldCollisionIsExplosion
Whether the collision is an exploision. If not explosion, collision is directional.
Public fieldCollisionMask
The layers that the spell should collide with
Public fieldCollisionParticleSystem
The particle system for collisions. For best effects, this should emit particles in bursts at time 0 and not loop.
Public fieldCollisionRadius
The radius of the collision explosion
Public fieldCollisionVolumeRange
Collision sound volume range.
Public fieldCooldown
The cooldown in seconds. Once cast, the spell must wait for the cooldown before being cast again.
Public fieldDirection
The direction of the spell. Should be normalized. Does not change unless explicitly modified.
Public fieldDuration
The duration in seconds that the spell will last. Not all spells support a duration. For one shot spells, this is how long the spell cast / emission light, etc. will last.
Public fieldEmissionLight
Light to illuminate when spell is cast
Public fieldEmissionParticleSystem
Emission particle system. For best results use world space, turn off looping and play on awake.
Public fieldEmissionSound
Emission sound
Public fieldMaxDistance
The maximum distance of the spell
Public fieldSpellEnd
The end point of the spell. Set this to an empty game object. This will change depending on things like collisions, randomness, etc. Not all spells need an end object, but create this anyway to be sure.
Public fieldSpellStart
The start point of the spell. Set this to a muzzle end or hand.
See Also