Big problem for me. Mobs are seeing through obstacles

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!
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

Re: Big problem for me. Mobs are seeing through obstacles

Post by MrChoke » Thu Jan 19, 2017 7:39 pm

Isaac wrote:
MrChoke wrote:They are standard wall textures but I am not using any tile set. All of my levels are almost 100% void tiles. I have to do this because wall squares as returned by the map object are determined only when the dungeon loads (the tile has the "solid" parm set to true). It is read-only after that point. So I cannot dynamically make corridors where ever I want if there are walls defined.
Ah. A mistake in the term on my part, but by 'tile set' I meant map objects, not tiles per se, as placed in the editor. I meant that if you want a maze of castle walls, why not spawn the castle secret door object as your walls? (Instead of spawning invisible walls, and putting wall textures in front of them)
Yeah that is basically what I had to do to get it to work. The complexity with the DoorComponent is the game makes use it like a real door to be opened/closed etc.. and also as a wall that blocks sight. In my code I started calling these "DoorWalls" because really that is what they are. The other thing with using a door to make a whole square a wall is that the door still has facing and a model too unless you turn it off. Its overkill for my need where I just wanted a square that mobs couldn't see through. A flag on the Obstacle component that could specify whether mobs see through it would have been perfect.

Post Reply