Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
ok,
thank you for the answer.
thank you for the answer.
Re: Ask a simple question, get a simple answer
This depends on the animation. Some animations set the position of RootNode and some don't. As it happens, the animation bongobeat is using doesn't; it will keep the offset.Skuggasveinn wrote: ↑Thu Jul 25, 2019 4:00 pmyes but, offsetting a model doesn't offset the animation, so when the animation plays on the second model it will "jump" into the original position.
What you want is to offset the animation in blender and save it out for the second model.
kind regards.
Skuggasveinn.
Anyway, to animate two models, you need two AnimationComponents:
Code: Select all
defineObject{
name = "forest_spruce_sapling_pillar_2x1",
-- baseObject = "base_pillar",
components = {
{
class = "Model",
model = "assets/models/env/forest_spruce_sapling_02.fbx",
staticShadow = true,
},
{
class = "Animation",
animations = {
sway = "assets/animations/env/forest_spruce_sapling_02_idle.fbx",
},
playOnInit = "sway",
loop = true,
},
{
class = "Model",
name = "pil2",
model = "assets/models/env/forest_spruce_sapling_02.fbx",
offset = vec(0, 0, -3),
staticShadow = true,
},
{
class = "Animation",
name = "animation2",
model = "pil2",
animations = {
sway = "assets/animations/env/forest_spruce_sapling_02_idle.fbx",
},
playOnInit = "sway",
loop = true,
},
},
placement = "pillar",
editorIcon = 108,
minimalSaveState = true,
}
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
That is a really great tip. I was unaware that the model could be specified.
Re: Ask a simple question, get a simple answer
How do you control the direction the party's facing when you exit stairs. I have 2 stairs on the same level that are facing different directions, how do I control what direction there facing when they exit the other side?
Re: Ask a simple question, get a simple answer
Via script placing their position, or [in editor] via invisible teleporter with its destination set to its own tile, and its spin feature set to the direction.
(Of course you'll have to suitably handle the teleporter behavior afterwards, to allow them to reenter the stairs without effect.)
(Of course you'll have to suitably handle the teleporter behavior afterwards, to allow them to reenter the stairs without effect.)
Re: Ask a simple question, get a simple answer
I forgot about the invisible teleporter LOL. Been creating assets so much I almost forgot how to build a level One more question, is it possible to remove the fade?Isaac wrote: ↑Wed Aug 07, 2019 7:27 pm Via script placing their position, or [in editor] via invisible teleporter with its destination set to its own tile, and its spin feature set to the direction.
(Of course you'll have to suitably handle the teleporter behavior afterwards, to allow them to reenter the stairs without effect.)
Re: Ask a simple question, get a simple answer
You can hack around the fade on StairsComponent/ExitComponent by calling GameMode.fadeIn(0,0) every frame. However, this won't give you seamless stairs as the party's stair climbing animation doesn't quite actually reach the top/bottom.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Ask a simple question, get a simple answer
I received bug reports for custom alcoves which I gave additional components, namely "Clickable" and "Surface". However, bugs were reported saying that after a save&reload, items placed inside cannot be retrieved anymore. I assume the clickable option is lost during a save.
I deleted the minimalSaveState bit and upon starting a new custom dungeon it seemed to work just fine, but I am uncertain whether this really fixed the issue. In the Grimrock Asset Pack all the "pedestals" use the minimalaveState, so I am not sure.
Any idea?
I deleted the minimalSaveState bit and upon starting a new custom dungeon it seemed to work just fine, but I am uncertain whether this really fixed the issue. In the Grimrock Asset Pack all the "pedestals" use the minimalaveState, so I am not sure.
Any idea?
Code: Select all
defineObject{
name = "catacomb_alcove_candle_02",
baseObject = "base_wall",
components = {
{
class = "Model",
model = "assets/models/env/catacomb_alcove_candle_02.fbx",
staticShadow = true,
},
{
class = "Light",
range = 3.5,
color = vec(1.1, 0.68, 0.35),
brightness = 7,
castShadow = true,
staticShadows = true,
staticShadowDistance = 0,
shadowMapSize = 256,
fillLight = true,
offset = vec(-0.3, 1.15, 0.15),
onUpdate = function(self)
local noise = math.noise(Time.currentTime()*3 + 123) * 0.5 + 0.9
self:setBrightness(noise * 10)
end,
},
{
class = "Particle",
particleSystem = "catacomb_alcove_candles_02",
},
{
class = "Surface",
offset = vec(0, 0.85, 0.2),
size = vec(1, 0.65),
},
{
class = "Clickable",
offset = vec(0, 0.85+0.1, 0),
size = vec(1.1, 0.2, 0.9),
pedestal = true,
},
{
class = "Occluder",
model = "assets/models/env/catacomb_alcove_01_occluder.fbx",
},
},
editorIcon = 92,
-- minimalSaveState = true,
}
Re: Ask a simple question, get a simple answer
For a custom tile damaging spell (similar to fireburst and shockburst), how can I prevent casting in front of the party if the tile is blocked?
Apparently, this can lead to a CTD at the edge of a level and allows cheating by casting through grates and even solid walls.
Apparently, this can lead to a CTD at the edge of a level and allows cheating by casting through grates and even solid walls.
Re: Ask a simple question, get a simple answer
This is not true. There is only one pedestal in the asset pack and it does not have minimalSaveState. Objects that have SurfaceComponents or SocketComponents, including the object you posted, will break if you give them minimalSaveState.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.