Statistics: Posted by Kaeden — 11 Nov 2015, 21:51
Statistics: Posted by ckitching — 12 May 2015, 02:04
Statistics: Posted by arkitect — 08 May 2015, 12:19
Statistics: Posted by nine2 — 05 Mar 2015, 04:24
Statistics: Posted by pip — 13 Jun 2014, 12:13
Statistics: Posted by arkitect — 13 Jun 2014, 11:46
Statistics: Posted by Fernest — 11 Jun 2014, 04:11
Statistics: Posted by arkitect — 03 Jun 2014, 11:06
# One initial projectile following same directional path as the original
#self:CreateChildProjectile(ChildProjectileBP):SetVelocity(vx, vy, vz):SetVelocity(velocity):PassDamageData(self.DamageData)
Statistics: Posted by arkitect — 31 May 2014, 02:28
Statistics: Posted by arkitect — 30 May 2014, 13:42
Statistics: Posted by pip — 30 May 2014, 12:06
# One initial projectile following same directional path as the original
self:CreateChildProjectile(ChildProjectileBP):SetVelocity(vx, vy, vz):SetVelocity(velocity):PassDamageData(self.DamageData)
# Create several other projectiles in a dispersal pattern
local numProjectiles = 4
local angle = (2*math.pi) / numProjectiles
local angleInitial = RandomFloat( 0, angle )
# Randomization of the spread
local angleVariation = angle * 0.35 # Adjusts angle variance spread
local spreadMul = 0.5 # Adjusts the width of the dispersal
local xVec = 0
local yVec = vy
local zVec = 0
# Launch projectiles at semi-random angles away from split location
for i = 0, (numProjectiles -1) do
xVec = vx + (math.sin(angleInitial + (i*angle) + RandomFloat(-angleVariation, angleVariation))) * spreadMul
zVec = vz + (math.cos(angleInitial + (i*angle) + RandomFloat(-angleVariation, angleVariation))) * spreadMul
local proj = self:CreateChildProjectile(ChildProjectileBP)
proj:SetVelocity(xVec,yVec,zVec)
proj:SetVelocity(velocity)
proj:PassDamageData(self.DamageData)
end
Statistics: Posted by arkitect — 30 May 2014, 05:44