Hi everyone,
i'm trying to dig a hole (forest_chasm) to go underneath map. if i put the chasm directly in my map everything is ok but if i spawn chasm after digging i have a visual problem, i see chasm border but inside (where hole would be) i see normal forest_ground i used in map...even if i still fall inside chasm.
Anyone has any clue on how to solve this problem?
Thanks
digging a hole problem
Re: digging a hole problem
Most tiles work by spawning entities. For example:
A "dungeon_floor_dirt_01" entity is spawned on dungeon_floor tile to provide the floor model. You can turn this floor into a pit with no problem; just destroy the dungeon_floor_dirt_01 entity and spawn your pit.
But if you look at the definition for a heightmapped tile:
Notice that this tile doesn't spawn any entities. Instead, it specifies a heightmap material. The level's heightmap object effectively builds a contiguous mesh out of all the heightmapped tiles on the level. There is no longer a floor entity to destroy, so you cannot modify the heightmapped squares at runtime.
As for why it works if you place the pit in the editor:If an entity has "killHeightmap", the heightmap mesh will not be built over that tile.
As far as I know, the heightmap mesh can never change after the dungeon has been loaded. If you add heightmap or killHeightmap objects after the dungeon is loaded, they will have no effect on the heightmap until the player saves and reloads their game.
Code: Select all
defineTile{
name = "dungeon_floor",
editorIcon = 192,
color = {150,150,150,255},
builder = "dungeon",
floor = {
"dungeon_floor_dirt_01", 1,
},
ceiling = {
"dungeon_ceiling", 1,
},
wall = {
"dungeon_wall_01", 35,
"dungeon_wall_02", 35,
"dungeon_wall_drain", 2,
},
pillar = {
"dungeon_pillar", 1,
},
ceilingEdgeVariations = true,
ceilingShaft = "dungeon_ceiling_shaft",
}But if you look at the definition for a heightmapped tile:
Code: Select all
defineTile{
name = "forest_ground",
editorIcon = 200,
color = {70,150,70,255},
builder = "dungeon",
-- floor geometry is generated by heightmap
heightmapMaterial = "forest_ground_01",
diggable = true,
moveSound = "party_move_grass",
automapTile = "grassy_ground",
}As for why it works if you place the pit in the editor:
Code: Select all
defineObject{
name = "base_pit",
components = {
{
class = "Pit",
},
},
replacesFloor = true,
killHeightmap = true,
placement = "floor",
editorIcon = 40,
automapIcon = 108,
}As far as I know, the heightmap mesh can never change after the dungeon has been loaded. If you add heightmap or killHeightmap objects after the dungeon is loaded, they will have no effect on the heightmap until the player saves and reloads their game.
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: digging a hole problem
Thanks for fast reply and precise explanation
if i understood this menas that is absolutely impossible to do what i want...
...big problem for me, means i have to change 2 maps i already built (i kept the hole as last thing to put)
...i feel like i want to cry T_T...too much limitations
if i understood this menas that is absolutely impossible to do what i want...
...big problem for me, means i have to change 2 maps i already built (i kept the hole as last thing to put)
...i feel like i want to cry T_T...too much limitations