Fireball falling from ceiling.
Posted: Thu Jul 23, 2015 3:13 am
So I'm looking to be able to have a fireball fall down from the ceiling. I've been teasing some of the code to change directions of different things.
That's the code that I'm working with at the moment. I can not figure out how to switch it from launching just forward.
Code: Select all
defineObject{
name = "fireball_large_boss",
baseObject = "base_spell",
components = {
{
class = "Particle",
particleSystem = "fireball_large_boss",
},
{
class = "Light",
color = vec(1, 0.5, 0.25),
brightness = 15,
range = 7,
castShadow = true,
},
{
class = "Projectile",
spawnOffsetY = 1.35,
velocity = 1,
radius = 0.1,
hitEffect = "fireball_blast_large",
},
{
class = "Sound",
sound = "fireball",
},
{
class = "Sound",
name = "launchSound",
sound = "fireball_launch",
},
},
}
defineParticleSystem{
name = "fireball_large_boss",
emitters = {
-- smoke
{
emissionRate = 30,
emissionTime = 0,
maxParticles = 100,
boxMin = {0.0, 0.0, 0.0},
boxMax = {0.0, 0.0, 0.0},
sprayAngle = {0,360},
velocity = {0.1,0.1},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {1,1},
color0 = {0.25, 0.25, 0.25},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.9,
size = {0.4, 0.6},
gravity = {0,10,0},
airResistance = 0.1,
rotationSpeed = 1,
blendMode = "Translucent",
},
-- flames
{
emissionRate = 100,
emissionTime = 0,
maxParticles = 100,
boxMin = {-0.03, -0.03, 0.03},
boxMax = { 0.03, 0.03, -0.03},
sprayAngle = {0,360},
velocity = {0.5, 0.7},
texture = "assets/textures/particles/torch_flame.tga",
frameRate = 35,
frameSize = 64,
frameCount = 16,
lifetime = {0.8, 0.8},
colorAnimation = true,
color0 = {2, 2, 2},
color1 = {1.0, 1.0, 1.0},
color2 = {1.0, 0.5, 0.25},
color3 = {1.0, 0.3, 0.1},
opacity = 1,
fadeIn = 0.15,
fadeOut = 0.3,
size = {0.25, 0.35},
gravity = {0,10,0},
airResistance = 1,
rotationSpeed = 1,
blendMode = "Additive",
objectSpace = true,
},
-- flame trail
{
emissionRate = 80,
emissionTime = 0,
maxParticles = 100,
boxMin = {0.0, 0.0, 0.0},
boxMax = {0.0, 0.0, 0.0},
sprayAngle = {0,360},
velocity = {0.1, 0.3},
texture = "assets/textures/particles/torch_flame.tga",
frameRate = 35,
frameSize = 64,
frameCount = 16,
lifetime = {0.2, 0.3},
colorAnimation = true,
color0 = {2, 2, 2},
color1 = {1.0, 1.0, 1.0},
color2 = {1.0, 0.5, 0.25},
color3 = {1.0, 0.3, 0.1},
opacity = 1,
fadeIn = 0.15,
fadeOut = 0.3,
size = {0.2, 0.5},
gravity = {0,10,0},
airResistance = 1.0,
rotationSpeed = 1,
blendMode = "Additive",
},
-- glow
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = {0,0,-0.1},
boxMax = {0,0,-0.1},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {1000000, 1000000},
colorAnimation = false,
color0 = {0.3, 0.13, 0.06},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.1,
size = {1.5, 1.5},
gravity = {0,10,0},
airResistance = 1,
rotationSpeed = 2,
blendMode = "Additive",
objectSpace = true,
}
}
}