Page 1 of 1
Wall that can be Walked Through
Posted: Wed Oct 07, 2015 6:41 pm
by TheLeadHound
Hello, I'm fairly new to modding with LoG. I was wondering if there was some way to make a wall that is not really there. For example, you look at a group of trees, but when you walk towards them you pass through them with out having them removed. I'm not even sure if there is a way to reference a wall with scripting, so any help would be appreciated.
Re: Wall that can be Walked Through
Posted: Wed Oct 07, 2015 7:26 pm
by Azel
Sure, you can lay down a big tree (forest_spruce_01) or a bunch of trees (forest_oak_cluster) and simply "uncheck" the Obstacle property. You may even want to uncheck ProjectileCollider. Then you can walk right on through it.
Most Walls start off allowing players to walk through them by default so that's easy enough. The few walls that do not allow this simply need to have their Obstacle/ProjectileCollider properties unchecked.
However, if the MinimalSaveState is set to "true" for the trees/walls, then that means the Obstacle/ProjectileCollider properties would return to normal after the player Saves/Reloads the game.
In which case you should either:
1) Clone the Wall/Tree and set the MinimalSaveState to "false"
2) Put floor triggers around the Wall/Tree that call a Script Function, which handles the Obstacle/ProjectileCollider properties for you
Either solution is viable, but I prefer option 2 since it allows your Mod to maintain assets with a MinimalSaveState (helps with optimization)
Re: Wall that can be Walked Through
Posted: Wed Oct 07, 2015 7:32 pm
by TheLeadHound
Ah fantastic, I had not even thought about using a game object instead of a tile. Thanks a bunch!
Re: Wall that can be Walked Through
Posted: Wed Oct 07, 2015 7:39 pm
by Azel
No problem. If this is your first time around with Modding and LoG then there's a bit of complexity (and learning curve) if you plan to do things that are "abnormal." I am happy to help where I can

Re: Wall that can be Walked Through
Posted: Wed Oct 07, 2015 7:52 pm
by minmay
Azel wrote:1) Clone the Wall/Tree and set the MinimalSaveState to "false"
2) Put floor triggers around the Wall/Tree that call a Script Function, which handles the Obstacle/ProjectileCollider properties for you
Either solution is viable, but I prefer option 2 since it allows your Mod to maintain assets with a MinimalSaveState (helps with optimization)
Um...option 2 is strictly
worse than option 1, because floor triggers and your script require full save state. So you're saving tons
more information than you would by using a single object without minimalSaveState. Not to mention that your floor trigger approach wouldn't actually work in the first place (what happens when your player reloads while standing on a floor trigger? what about projectiles?).
Mind you, your option 1 doesn't really make sense either. Neither "solution" is viable. If you're going to define a new object that lacks minimalSaveState just so you can disable a component...why not just define a new object without an ObstacleComponent in the first place, and use it in these places? Then you can still use minimalSaveState. Like this:
Code: Select all
defineObject{
name = "forest_spruce_01_noblock",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "assets/models/env/forest_spruce_01.fbx",
dissolveStart = 4,
dissolveEnd = 6,
staticShadow = true,
},
{
class = "Animation",
animations = {
sway = "assets/animations/env/forest_spruce_01_idle.fbx",
},
playOnInit = "sway",
loop = true,
maxUpdateDistance = 5,
},
},
editorIcon = 172,
automapTile = "trees",
minimalSaveState = true,
}
Re: Wall that can be Walked Through
Posted: Wed Oct 07, 2015 8:37 pm
by Azel
minmay wrote:Um...option 2 is strictly worse than option 1, because
... because I'm the one who said it and you hate when someone other than you says something?
Granted floor triggers could be a bit sloppy but then again, the question was vague and the setup here isn't very clear. So lets take a scenario where the Player goes in to a room and pulls a lever; now for 30 seconds what was once an impassible group of trees is now a passable "illusion." In that case, it would be a timer controlling the Obstacle/ProjectileCollder properties of the standard Spruce. For 30 seconds a master timer is running the puzzle while a smaller timer handles the illusion (fraction of a second checks against the Spruce's properties). Then, it doesn't matter when the player saves/reloads the game.
With your cute little Object recreation, the player can't alternate between a Solid tree and a Passable tree because your objects has MinimalSaveState. All you did was replace problems on one side of the spectrum with problems on the other side. Your solution only works if the puzzle and gameplay is strictly linear and monotonous.