Ask a simple question, get a simple answer

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!
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

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.
Aha.

Thanks.
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

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.
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.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

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.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

For some reason, turning debugDraw to true doesn't display them normally, but only in water reflection.
Where could I possibly screw this up?
SpoilerShow
Image
My asset pack [v1.10]
Features a bit of everything! :D
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

It's a bug. It's easiest to just destroy the water surface when you want to look at them.
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.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

minmay wrote:It's a bug. It's easiest to just destroy the water surface when you want to look at them.
Oh. Thanks!
My asset pack [v1.10]
Features a bit of everything! :D
brzrkr
Posts: 11
Joined: Wed Aug 10, 2016 4:05 pm

Re: Ask a simple question, get a simple answer

Post by brzrkr »

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".
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

Apparently, removing the watersurface entity doesn't fix every debugdraw box.
SpoilerShow
Image
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.
My asset pack [v1.10]
Features a bit of everything! :D
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

zimberzimber wrote:Apparently, removing the watersurface entity doesn't fix every debugdraw box.
SpoilerShow
Image
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.)
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.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Ask a simple question, get a simple answer

Post by zimberzimber »

minmay wrote:
zimberzimber wrote:Apparently, removing the watersurface entity doesn't fix every debugdraw box.
SpoilerShow
Image
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.
My asset pack [v1.10]
Features a bit of everything! :D
Post Reply