(continuing with the disintegrate things, humm...)
is their a way to define a custom bomb, which give physical damage, and after hit, it shows the disintegrate effect?
I did not find any particle system related to the disintegrate spell, where can it be find?
Actually I have done this with a new base_spell object: it works, but the particle effect is based on a blob particle and it don't give xp.
Code: Select all
defineObject{
name = "star_bomb",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/shock_bomb.fbx",
},
{
class = "Item",
uiName = "Stars Bomb",
gfxIndex = 90,
gfxAtlas = "mod_assets/textures/oliveitem.tga",
impactSound = "impact_blunt",
stackable = true,
projectileRotationSpeed = 10,
projectileRotationZ = -30,
weight = 0.8,
traits = { "throwing_weapon" },
convertToItemOnImpact = "greater_blob_blast",
},
{
class = "ThrowAttack",
cooldown = 4,
},
-- {
-- class = "BombItem",
-- bombType = "shock",
-- bombPower = 1000,
-- },
},
tags = { "weapon", "weapon_throwing" },
}
defineObject{
name = "greater_blob_blast",
baseObject = "base_spell",
components = {
{
class = "Particle",
particleSystem = "greater_blob_hit",
destroyObject = true,
},
{
class = "Light",
color = vec(0.4, 0.5, 0.6),
brightness = 60,
range = 10,
fadeOut = 0.5,
},
{
class = "Sound",
sound = "blob_hit",
},
{
class = "TileDamager",
name = "damager1",
attackPower = 1000,
damageType = "physical",
woundChance = 100,
},
},
}
defineParticleSystem{
name = "greater_blob_hit",
emitters = {
-- sparks
{
spawnBurst = true,
maxParticles = 80,
boxMin = { 0.0, 0.5, 0.0},
boxMax = { 0.0, 1.0, 0.0},
sprayAngle = {0,360},
velocity = {4,6},
objectSpace = false,
texture = "assets/textures/particles/teleporter.tga",
lifetime = {0.2,0.6},
color0 = {4.0,3.0,3.0},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.3,
size = {1.0, 4.0},
gravity = {0,-6,0},
airResistance = 1,
rotationSpeed = 2,
blendMode = "Additive",
},
-- fog
{
spawnBurst = true,
maxParticles = 30,
sprayAngle = {0,360},
velocity = {0,3},
objectSpace = true,
texture = "assets/textures/particles/fog.tga",
lifetime = {0.4,0.6},
color0 = {0.4, 0.5, 0.6},
opacity = 0.7,
fadeIn = 0.1,
fadeOut = 0.3,
size = {2, 4},
gravity = {0,0,0},
airResistance = 0.5,
rotationSpeed = 1,
blendMode = "Additive",
},
-- glow
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = { 0.0, 0.5, 0.0},
boxMax = { 0.0, 1.0, 0.0},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {0.5, 0.5},
colorAnimation = false,
color0 = {1, 1, 1},
opacity = 1,
fadeIn = 0.01,
fadeOut = 0.5,
size = {3, 6},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 2,
blendMode = "Additive",
}
}
}