How can I make a spawned Poison Cloud last longer?
How can I make a spawned Poison Cloud last longer?
I can't seem to find any location in the spells about the duration of the poison_cloud item. I want a spawner to spawn a poison cloud and for it to last 15 seconds - where should I start on this, some sort of custom spell item?
Finished Dungeons - complete mods to play
Re: How can I make a spawned Poison Cloud last longer?
I found a poison_cloud.lua under assets/particles but I don't see any duration section (there is a "lifetime" for each particle type, but it's always 0.5 or 1 or 2, probably just how long each little graphic effect within the poison cloud hangs around)
Finished Dungeons - complete mods to play
Re: How can I make a spawned Poison Cloud last longer?
Maybe at spawn also creating a poison damagetile and destroy it after 15 sec?
Just speculating, I have not used damagetiles myself.
Just speculating, I have not used damagetiles myself.
http://www.grimrock.net/modding/scripting-reference/damageTile(level, x, y, direction, flags, damageType, power)
...
Flags:
"bit 1: ongoing damage such as poison cloud"
Re: How can I make a spawned Poison Cloud last longer?
I was looking into that idea too, but I'm not sure how it would work out - the appearance (particles, clouds, etc) need to last 15 sec too. Maybe I could completely fake it, not spawn the spell, but just fake particles and stuff that look like the spell, and also a damageTile. But would I be able to make the particles fade out correctly like the spell does?
Jeesh, this would be a lot easier if I could just tell the poison_cloud to last x seconds!
Jeesh, this would be a lot easier if I could just tell the poison_cloud to last x seconds!
Finished Dungeons - complete mods to play
Re: How can I make a spawned Poison Cloud last longer?
If you looked at my Onkalo Project mod there is a freezer that has fog (a cloud) in it. That is actually a invisible floor object with particle spray "attached" to it.Komag wrote:I was looking into that idea too, but I'm not sure how it would work out - the appearance (particles, clouds, etc) need to last 15 sec too. Maybe I could completely fake it, not spawn the spell, but just fake particles and stuff that look like the spell, and also a damageTile. But would I be able to make the particles fade out correctly like the spell does?
Jeesh, this would be a lot easier if I could just tell the poison_cloud to last x seconds!
If constantly emits fog, If I destory the object the fog disappears (possible fade out if already sprayed particles stays alive their short lifetime even when object is destroyed?).
So basically you could just spawn a poisoncloud object and damagetile, then after 15sec remove both.
my freezer fog code:
Objects.lua:
Code: Select all
defineObject{
name = "freezer_floor",
class = "LightSource",
lightPosition = vec(0.5, 0.5, 0),
lightRange = 1,
lightColor = vec(1, 1, 1),
brightness = 1,
castShadow = true,
particleSystem = "freeze_fog",
placement = "floor",
editorIcon = 88,
}Code: Select all
defineParticleSystem{
name = "freeze_fog",
emitters = {
-- fog
{
emissionRate = 1.3,
emissionTime = 0,
maxParticles = 100,
boxMin = {-1, 0.1, -1},
boxMax = { 1, 0.1, 1},
sprayAngle = {0,35},
velocity = {0,0},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {10,20},
color0 = {1, 1, 1},
opacity = 0.1,
fadeIn = 9,
fadeOut = 9,
size = {4, 8},
gravity = {0,0,0},
airResistance = 0.1,
rotationSpeed = 0.1,
blendMode = "Translucent",
objectSpace = false,
}
}
}
Last edited by aaneton on Wed Oct 31, 2012 1:25 pm, edited 1 time in total.
Re: How can I make a spawned Poison Cloud last longer?
Thanks for that!
I'll have to look into it over the next day or two - it's a bit complex but I'm ready to tackle it I think
I'll have to look into it over the next day or two - it's a bit complex but I'm ready to tackle it I think
Finished Dungeons - complete mods to play
Re: How can I make a spawned Poison Cloud last longer?
I can make the poison cloud particles stay now for the 15 seconds I want, by setting up a custom particles for it (a copy of the poison_cloud but with "emissionTime = 15" instead of "emissionTime = 0" (not sure why it ended after 6sec when 0 means forever)
Now I'm working on the damageTile portion, which turns out is very tricky
Now I'm working on the damageTile portion, which turns out is very tricky
Finished Dungeons - complete mods to play
Re: How can I make a spawned Poison Cloud last longer?
Good luck, Komag!
I know I've been quiet, but I've had my eye on this thread since the beginning.
I know I've been quiet, but I've had my eye on this thread since the beginning.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: How can I make a spawned Poison Cloud last longer?
I have it set up with a ticking timer set to 0.6 seconds, so to get to 15 seconds that's 25 ticks:
The math part with 26/(2+tombTick1) is to recreate a quickly diminishing damage I observed in the game. Over time, the denominator grows, so that by the second to last tick (24), it's 26/26, or just one. Quite a few ticks before the end it's close to 1. It starts around 8 and goes down fast, sort of a reverse exponential.
There's actually a second set that can operate at the same time after 10 seconds if you step on the plate again, so they "overlap" for a bit if you do that.
Code: Select all
tombTick1 = 1
function poisonTile1()
if tombTick1 < 25 then
for i = 1,5 do damageTile(11, 16, 20+i, 0, 2, "poison", 26/(2+tombTick1)) end
else
tombPoisonTimer1:deactivate()
tombTick1 = 1
return
end
tombTick1 = tombTick1 + 1
endThere's actually a second set that can operate at the same time after 10 seconds if you step on the plate again, so they "overlap" for a bit if you do that.
Finished Dungeons - complete mods to play
