Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
minmay wrote:The create function is included as a field on all GameObjects and Components. I don't think it's actually useful for anything from the user scripting interface.
By the way, what do you mean by "seems to take arguments"? In Lua if you pass more arguments than there are specified in the function's declaration, the extra arguments are just silently discarded, it won't result in an error or warning.
minmay wrote:By the way, what do you mean by "seems to take arguments"? In Lua if you pass more arguments than there are specified in the function's declaration, the extra arguments are just silently discarded, it won't result in an error or warning.
I mentioned before, "*Perhaps it ignores arguments" .
I did tinker around with feeding it potion names, to no result.
Hi, I have another question; after looking through the reference I haven't found a way to make this work.
What I want to do is create some outdoor buildings; using the tiles for walls doesn't work and besides, it makes them occupy a whole tile, while I would only want the walls to occupy the edge of tiles. There are wall elements I can place, but they don't project any shadow and do not block movement (they also are invisible from one side, though I can just mirror them to fix this). All except the secret doors, which behave exactly as I'd like and expect walls to work. But there are several wall types, such as tomb walls, which have decorations and paintings that don't show up if I simply overlap a secret door with the wall I want; if I disable the door model, the shadow and collision goes with it.
So my question is: is there a way to make wall elements solid? I've found the ModelComponent:setBoundBox(desc) method, but I don't know if that's what I'm looking for, nor what or how I'm supposed to populate "desc".
Apparently, removing the watersurface entity doesn't fix every debugdraw box.
SpoilerShow
The reflection in the image is on a material similar to watersurface. Becomes transparent and everything if you add a watersurface.
Removing this fountain (the only entity that uses the water material) still doesn't help.
This debugdraw box is part of the socket component, unlike the obelisks where its an itemconstraintbox.
zimberzimber wrote:Apparently, removing the watersurface entity doesn't fix every debugdraw box.
SpoilerShow
The reflection in the image is on a material similar to watersurface. Becomes transparent and everything if you add a watersurface.
Removing this fountain (the only entity that uses the water material) still doesn't help.
This debugdraw box is part of the socket component, unlike the obelisks where its an itemconstraintbox.
The WaterSurfaceComponent is what makes the reflections and causes the debugDraw bug. Not the water material. You need to destroy all WaterSurfaceComponents on this level. (Also, you should never have more than one WaterSurfaceComponent on a level in the first place.)
zimberzimber wrote:Apparently, removing the watersurface entity doesn't fix every debugdraw box.
SpoilerShow
The reflection in the image is on a material similar to watersurface. Becomes transparent and everything if you add a watersurface.
Removing this fountain (the only entity that uses the water material) still doesn't help.
This debugdraw box is part of the socket component, unlike the obelisks where its an itemconstraintbox.
The WaterSurfaceComponent is what makes the reflections and causes the debugDraw bug. Not the water material. You need to destroy all WaterSurfaceComponents on this level. (Also, you should never have more than one WaterSurfaceComponent on a level in the first place.)
There are no water surface components on the level, yet this gets reflected anyways.
What I said was that I've mapped the material used by watersurface to these faces on the model (the fountain under the armor)
And even removing the model doesn't change anything.
Even on a newly added level, it still doesn't display.