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

Big problem for me. Mobs are seeing through obstacles

Post by MrChoke »

I cannot believe I didn't realize this until now. Monsters are seeing through obstacles and I am not finding a way to stop it. This is a total FAIL for my dungeon if I cannot fix this. I am making a 100% generated dungeon having no pre-placed walls. I create walls by placing invisible walls in squares and put wall textures in front of them. And the mobs are seeing through them!!!! UGH, this is so bad for me. And I was making amazing progress on my mod too.

Ok, I thought of something that sucks but may work. Maybe I can put door components in these "wall" squares. I know they can't see through those either. But that is so lame. Is there any component or setting I can make to stop this problem?
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

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

Post by MrChoke »

Ok, my door/wall has no model therefore no gate node. So it failed unless I put a door model in. I did this and disabled it and YAY!!! It works. Whew.....

Anyway, if anyone has any other idea on how to resolve my problem, please let me know. This does complicate my code now since all of these squares will come back as "door" and not "obstacle" now when I use commands like checkObstacle(). Oh well I guess.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

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

Post by zimberzimber »

You can use the 'blocker' object for when you need an entire tile blocked.
If you need the passage between tiles blocked, then your method works just fine.
My asset pack [v1.10]
Features a bit of everything! :D
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

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

Post by MrChoke »

zimberzimber wrote:You can use the 'blocker' object for when you need an entire tile blocked.
If you need the passage between tiles blocked, then your method works just fine.
Yes, blocker will block movement but my problem is blocking sight. So what is happening is say take a herder in a room a few squares away from a room I am in. Wall textures are up and an invisble wall is in between me and the herder. I cannot see him. Yet he can see me and he fires at me. I hear it and I see a floating "0" as his poison bolt hits the invisble wall. It's a fail like this. I cannot have them see me and me not see them.

The doors work but I wish the Obstacle component could have some kin dof sight blocking ability.

There are so many things I wish this game had to be honest. Bugs I wish were gone, hooks that I think are missing, etc... Case in point on bugs, now that I have to rely on monster not seeing me through doors, sometimes they will see me anyway. This is a nasty bug never fixed. Since I can run my custom AI work around on all monsters in my dungeon, I'll just have to deal with it.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

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

Post by zimberzimber »

I thought blockers did that already? Guess I was wrong
My asset pack [v1.10]
Features a bit of everything! :D
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

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

Post by minmay »

Sight is only blocked by walls and closed, non-sparse DoorComponents.
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.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

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

Post by MrChoke »

minmay wrote:Sight is only blocked by walls and closed, non-sparse DoorComponents.
Yeah... so it seems. Bummer. Thanks.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

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

Post by Isaac »

MrChoke wrote:I create walls by placing invisible walls in squares and put wall textures in front of them.
Are these walls using the existing wall textures, or are they new/original wall art used as dungeon walls? [ie. Something that would normally require a new tile set.]

What I am not understanding is the need for invisible walls, instead of just spawning the existing level assets [secret doors] in the layout that you wish.
MrChoke
Posts: 324
Joined: Sat Oct 25, 2014 7:20 pm

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

Post by MrChoke »

Isaac wrote:
MrChoke wrote:I create walls by placing invisible walls in squares and put wall textures in front of them.
Are these walls using the existing wall textures, or are they new/original wall art used as dungeon walls? [ie. Something that would normally require a new tile set.]

What I am not understanding is the need for invisible walls, instead of just spawning the existing level assets [secret doors] in the layout that you wish.
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.
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

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

Post by Isaac »

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)
Post Reply