TimedBlasts attempts to give a system to create various "timed blasts" that can be customized to create tons of different spells that follow the general layout
User begins channeling animation, creating the projectile near them..
after a certain size is reached, the projectile is launched to the target point inflicting damage.
If two "clashable" blasts hit each other, the two casters will be in a struggle until one runs out of mana, and the winning blast will change target to its opposing caster unit.
*visual example of what this code attempts to achieve in the case of a 3d clashable blast https://www.youtube.com/watch?v=M7i5Z3C5ZOk
*note clashable and 3d hasn't been tested/made yet*
protected real impactAoe - size of aoe for damage to be done
protected real damage - damage to be done
protected real endScale - final scale of the blast before launching
protected boolean trailOn - creates a trail following the blast as it flies to the target
protected boolean dustOn - creates a dust effect around the caster as he fires
protected boolean pulseOn - makes the missile pulsate as it flies to the targeted area
protected boolean launchOn - creates a launch effect as the missile is launched
protected boolean dropOn - if the missile is fired from an aerial position, the missile is lowered to the targetted area
protected boolean flightOn - if the missile will be fired from an aerial position
protected string trailSFX - specify what SFX will be used for the trail
protected string pulseSFX - specify what SFX will be used for the pulse
protected string launchSFX - " "
protected string finalSFX - " "
protected string dustSFX - " "
protected real trailSize - size of trail created
protected real pulseSize - size of pulses
protected real launchSize - size of launch
protected colorA missileCol - color of missile
protected colorA trailCol = color of trail
protected colorA pulseCol = color of pulse
protected real speed - speed of missile during travel
protected int channelIndex - animation index to channel
protected int launchIndex - animation index to launch
protected real offsetDistance = 50 - small offset from caster
protected real realDropSpeed = -15 if there is a drop, reasonable dropspeed, can be changed
private real timeSinceLastTrail = 0 - used to create trail
private real timeSinceLastPulse = 0 - used to create pulses
private real timeSinceLastChannel = 0 - uses to create channel
protected real timeDistance - how long trails and pulses should last, depends on speed, and missile sizes, should be configured to each spell accordingly
protected sound throwSound = generic missile size
protected real lowerRate = 150. speed that a missile will lower if it is a 3d missile
protected real destroyExplode = 1.5 how long the destruction sfx will be played
protected boolean clashing - setting if the missile is ready to clash
protected boolean clashable - saves true value for clashable until channeling is complete
protected boolean clashed - if a missile has clashed, prevents further clashs
protected boolean channeling = if a missile is still channeling, it cannot clash yet
*/
package Projectile
import public Entity
public class Projectile extends FxEntity
// Angles
protected angle xyAngle
private vec3 startpos
private boolean timed = false
private boolean ranged = false
// Moving Speed
private real speed = 0
private real acc = 1.0
protected real dist = 0
private real maxDist = 0
protected real lifespan = 0
protected real dropSpeed = 0
construct( vec3 pos, real radius, player owner, angle xyAngle, string fxpath )