For anyone who wants the deathball monster attack you will need the following...
Code: Select all
defineObject{
name = "eogardian",
class = "Monster",
model = "assets/models/monsters/uggardian.fbx",
meshName = "uggardian_mesh",
animations = {
idle = "assets/animations/monsters/uggardian/uggardian_idle.fbx",
moveForward = "assets/animations/monsters/uggardian/uggardian_walk.fbx",
strafeLeft = "assets/animations/monsters/uggardian/uggardian_strafe_left.fbx",
strafeRight = "assets/animations/monsters/uggardian/uggardian_strafe_right.fbx",
turnLeft = "assets/animations/monsters/uggardian/uggardian_turn_left.fbx",
turnRight = "assets/animations/monsters/uggardian/uggardian_turn_right.fbx",
attack = "assets/animations/monsters/uggardian/uggardian_attack.fbx",
getHitFrontLeft = "assets/animations/monsters/uggardian/uggardian_get_hit_front_left.fbx",
getHitFrontRight = "assets/animations/monsters/uggardian/uggardian_get_hit_front_right.fbx",
getHitBack = "assets/animations/monsters/uggardian/uggardian_get_hit_back.fbx",
getHitLeft = "assets/animations/monsters/uggardian/uggardian_get_hit_left.fbx",
getHitRight = "assets/animations/monsters/uggardian/uggardian_get_hit_right.fbx",
fall = "assets/animations/monsters/uggardian/uggardian_get_hit.fbx",
},
moveSound = "uggardian_walk",
attackSound = "uggardian_attack",
hitSound = "uggardian_hit",
dieSound = "uggardian_die",
hitEffect = "hit_flame",
capsuleHeight = 0.6,
capsuleRadius = 0.3,
collisionRadius = 0.8,
health = 235,
sight = 5,
attackPower = 30,
coolDown = { 1.5, 4 },
protection = 5,
immunities = { "fire" },
evasion = 10,
rangedAttack = "fireball",
movementCoolDown = 1,
flying = true,
noRecoilInterval = { 0.35, 0.5 },
exp = 500,
lightName = "light1",
lightColor = vec(1, 0.5, 0.25),
lightBrightness = 15,
lightRange = 3.5,
attackPowerIncrement = 5,
healthIncrement = 100,
protectionIncrement = 3,
brain = "Uggardian",
onRangedAttack = function(self)
local dx, dy = getForward(self.facing)
spawn("deathball", self.level, self.x + dx, self.y + dy, self.facing)
return false
end
}
- includes the particle systems too.
Code: Select all
-- deathball --
defineObject{
name = "deathball",
class = "ProjectileSpell",
particleSystem = "deathball",
hitParticleEffect = "deathball_hit",
lightColor = vec(0.5, 0.5, 0.25),
lightBrightness = 10,
lightRange = 7,
lightHitBrightness = 20,
lightHitRange = 10,
castShadow = true,
launchSound = "frostbolt_launch",
projectileSound = "frostbolt",
hitSound = "lightning_bolt_hit_small",
screenEffect = "damage_screen",
projectileSpeed = 7.5,
attackPower = 30,
damageType = "physical",
--cameraShake = true,
tags = { "spell" },
}
defineParticleSystem{
name = "deathball",
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,0,0},
airResistance = 0.1,
rotationSpeed = 1,
blendMode = "Translucent",
},
-- flames
{
emissionRate = 50,
emissionTime = 0,
maxParticles = 50,
boxMin = {-0.0, -0.0, 0.0},
boxMax = { 0.0, 0.0, -0.0},
sprayAngle = {0,360},
velocity = {0.3, 0.3},
texture = "mod_assets/textures/torch_flame_dark1.tga",
frameRate = 35,
frameSize = 64,
frameCount = 16,
lifetime = {0.8, 0.8},
colorAnimation = true,
color0 = {0.1, 0.2, 0.5},
color1 = {0.5, 0.5, 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.125, 0.25},
gravity = {0,0,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 = "mod_assets/textures/torch_flame_dark1.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.1, 0.3},
gravity = {0,0,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.5},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.1,
size = {1.5, 1.5},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 2,
blendMode = "Additive",
objectSpace = true,
}
}
}
defineParticleSystem{
name = "deathball_hit",
emitters = {
-- smoke
{
emissionRate = 15,
emissionTime = 0.3,
maxParticles = 100,
boxMin = {0.0, 0.0, 0.0},
boxMax = {0.0, 0.0, 0.0},
sprayAngle = {0,100},
velocity = {0.1, 0.5},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {0.5,1.5},
color0 = {0.25, 0.20, 0.17},
opacity = 1,
fadeIn = 0.3,
fadeOut = 0.9,
size = {2, 3},
gravity = {0,0,0},
airResistance = 0.1,
rotationSpeed = 0.5,
blendMode = "Translucent",
},
-- flames
{
spawnBurst = true,
maxParticles = 40,
sprayAngle = {0,360},
velocity = {0,1.5},
objectSpace = true,
texture = "mod_assets/textures/torch_flame_dark1.tga",
frameRate = 35,
frameSize = 64,
frameCount = 16,
lifetime = {0.4,0.6},
color0 = {0.3, 0.2, 0.3},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.3,
size = {0.5, 1.5},
gravity = {0,0,0},
airResistance = 0.5,
rotationSpeed = 2,
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 = {0.5, 0.5},
colorAnimation = false,
color0 = {0.3, 0.2, 0.3},
opacity = 1,
fadeIn = 0.01,
fadeOut = 0.5,
size = {4, 4},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 2,
blendMode = "Additive",
}
}
}
This version uses the standard Uggardian... you will need to change the models etc. for the finished Eogardian.