Shadowgate 2014 "Inspired" (Resource Pack)
Re: Shadowgate 2014 "Inspired" (Resource Pack)
Add a timer component to the lava object that fires the particle and set its next timer Intervall to a random number.
Re: Shadowgate 2014 "Inspired" (Resource Pack)
**And even then... you could pick from a stored precalculated table of non-repeating random values—that are picked randomly.
Re: Shadowgate 2014 "Inspired" (Resource Pack)
I have 3 particle systems on that object how do I specifically choose the one I want? Ill post my object code below, lol I don't really know how to set this up
Code: Select all
defineObject{
name = "rc_molten_floor_01",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "mod_assets/vanblam/red_cave/models/env/rc_molten_floor_01.fbx",
staticShadow = true,
offset = vec(0, -0.05, 0),
},
{
class = "Light",
range = 11,
offset = vec(0, 3, 0),
color = vec(1, 0.3, 0.08),
brightness = 8,
castShadow = false,
staticShadows = true,
shadowMapSize = 256,
},
{
class = "Particle",
particleSystem = "gen_lava_smoke01",
emitterMesh = "mod_assets/vanblam/red_cave/models/env/rc_lava_e_mesh.fbx",
},
{
class = "Particle",
name = "sparks",
particleSystem = "gen_lava_sparks01",
emitterMesh = "mod_assets/vanblam/red_cave/models/env/rc_lava_e_mesh_sparks.fbx",
},
{
class = "Particle",
name = "splashes",
particleSystem = "rc_lava_splash",
enabled = false,
},
{
class = "Timer",
timerInterval = 1,
disableSelf = false,
enabled = true,
onActivate = function(self)
self.go.particle.splashes:setEnabled(true)
end,
},
{
class = "Sound",
sound = "gen_lava",
},
{
class = "Occluder",
model = "assets/models/env/dungeon_floor_01_occluder.fbx",
},
},
minimalSaveState = true,
tags = { "red cave", "vanblam" },
}
- Should the timer be set to onActivate or something else?
Re: Shadowgate 2014 "Inspired" (Resource Pack)
Code: Select all
{
class = "Timer",
name = "splashestimer",
timerInterval = 5,
onActivate = function(self)
local time = math.random(5,10)
self.go.splashestimer:setTimerInterval(time)
self.go.splashes:restart()
end,
},
You can adress your particle components by its unique name ("splashes" in this case).
The random is now between 5 and 10 seconds but can of course be any other value.
This timer would be activated from the start on and doesn't stop at any time.
Re: Shadowgate 2014 "Inspired" (Resource Pack)
Awesome thanks budTHOM wrote: ↑Sun Jun 16, 2019 7:46 pmIn example like this (even I have not tested it).Code: Select all
{ class = "Timer", name = "splashestimer", timerInterval = 5, onActivate = function(self) local time = math.random(5,10) self.go.splashestimer:setTimerInterval(time) self.go.splashes:restart() end, },
You can adress your particle components by its unique name ("splashes" in this case).
The random is now between 5 and 10 seconds but can of course be any other value.
This timer would be activated from the start on and doesn't stop at any time.
Re: Shadowgate 2014 "Inspired" (Resource Pack)
Well thanks to you guys the lava came out really nice. Below is a video of the result.
Video Here!
I will be creating more lava rock style objects for you guys to use if you wish to add extra details
Video Here!
I will be creating more lava rock style objects for you guys to use if you wish to add extra details
Re: Shadowgate 2014 "Inspired" (Resource Pack)
Yeah - that's quiet cool!
What's about a soundeffect when the lava splashes?
And maybe you want to consider the lava be more untransparent when under "water"?
What's about a soundeffect when the lava splashes?
And maybe you want to consider the lava be more untransparent when under "water"?
Re: Shadowgate 2014 "Inspired" (Resource Pack)
You know I was thinking about having a sound for the splashes, glad you said something
Yea the water is at 50% so I could see the walls, I forgot to turn it back up
EDIT: Added the splash sound, its a nice touch
Re: Shadowgate 2014 "Inspired" (Resource Pack)
Looking great...
I WANT ME A LAVA BATH NOW
I WANT ME A LAVA BATH NOW
Re: Shadowgate 2014 "Inspired" (Resource Pack)
Huh? Should be a deadly Event...