Jump to content
The Dark Mod Forums

Community Excercise: A Closing Drawbridge

Recommended Posts

(Formed an own thread for this to avoid derailing the "Push" thread.)


I couldn't resist.. I just had to try it out. Check this:



It is map, where a pair of builders walk over a bridge. You can make the bridge close by operating the lever.


The ragdolls look very cool when they fall to their spiky deaths.


I'd like to propose a community excercise to improve this bridge concept. Feel free to check and improve the work so that in the end we have a fully working proof-of-concept.


At present it works like this:

There is a monsterclip brush on the bridge that allows the AI to walk on it. When the bridge is down there is a trigger_hurt on the monsterclip, making everyone die and fall.


Current problems:

  • The AI don't know the bridge is down. They walk to their deaths even they are not on the bridge initially. I tried to make a pair of nodraw doors that close when the bridge is down. Because they're nodraw, the AI aren't stopped by it. We need some kind of solution that makes the AI change his patrol route to make it seem he understands the bridge is down. One option is to teleport path_corners. But what if the player is on the other side of the chasm? The AI will run on the monsterclip bridge regardless of path_corners: not good!
  • Also the trigger_hurt prevents the player from going to the bridge. If the player goes to the downed bridge, he will die. Maybe the trigger_hurt gets disabled after killing everyone on the bridge. But what if AI's run later to the bridge?
  • In principle it seems we need some kind of monsterclip / door / AI path obstacle which can be turned on and off. The obstacle would simply tell the AI that this area is now unaccessible: the path is cut, the AI would skip over all the path_corners on the other side. It would work great if we just kill everyone on the bridge the instant when the bridge goes down. Then we shut down the trigger_hurt. Then we apply the path obstacle on the bridge. When we raise the bridge once more, the obstacle would be removed.

Now, how to improve this? If we, together as a community, figure this out, new kind of dynamic environments could be designed for future FM's. Trapdoors and drawbridges and the like. All sort of player-operated evil traps. :wub:


-The mapper's best friend.

Link to post
Share on other sites

Take a look at the func_aas_obstacle entities and the textures/editor/aassolid texture. They're used in elevator setups to enable/disable AAS areas during runtime.

Link to post
Share on other sites

Some quick first thought suggestions.


Try monsterclip doors instead of nodraw

Try the trigger hurt just below the bridge so the AI fall the first few feet still alive.

Look at the elevator setup. There is a switchable path aas entity thing that allows the AI to walk onto the elevator but not when its not there.

Check entities -there is another dynamic aas blocker I think.

Link to post
Share on other sites

Take a look at the func_aas_obstacle entities and the textures/editor/aassolid texture. They're used in elevator setups to enable/disable AAS areas during runtime.


LOL, dammit guys!


I thought this would have been a challenge, but the solution was found at the very first step. How have I managed to overlook those aas_obstacle-thingies? :wacko: Thanks!^_^


Anyways now it works just beautifully:



I just added a func_aas_obstacle, which is operated from the lever as well. When the bridge is cut, the AI won't go there, but go to the path_corners on their side of the chasm.


Mappers, feel free to check how this works from this map file and be sure to make some cool traps in your missions..


-The mapper's best friend.

Link to post
Share on other sites

Ha ha, it's almost like a Dwarf Fortress thread: "And then I used the drawbridge to kill people horribly..." =-P

"No proposition Euclid wrote,

No formulae the text-books know,

Will turn the bullet from your coat,

Or ward the tulwar's downward blow

Strike hard who cares—shoot straight who can—

The odds are on the cheaper man."


From 'Arithmetic on the Frontier' by Rudyard Kipling

Link to post
Share on other sites
  • 5 years later...

Time to do a thread-necro. ;-) *cast* *cast*


I've created two doors.

One is connected to a func_aas_obstacle with the texture textures/editor/aasobstacle

and the other one is connected to a func_aas_obstacle with the texture textures/editor/aassolid


Both entities are set to start_on = 1

There are some rats in the room.


The purpose of the obstacles is that the rats don't block the doors from opening (they are big doors rotating in the center).


As long as nothing has been touched, it's working as intended, the rats don't approach the func_aas_obstacles in front of the doors (both of them, even though they have different textures).

When the doors open, the func_aas_obstacles become inactive and the rats try to get through the doors (don't know why they hate that room so much :) ).

Not working, see below.


But when the doors close again, the func_aas_obstacles don't seem to become active again, because the rats stay in that area of the obstacle and even other rats who haven't been in the area of the obstacle can now enter the area in front of the now again closed door.


Am I missing something?

The func_aas_obstacles have been created by drawing brushes (reaching from the floor to the ceiling in a big enough area in front of the door) and creating a func_aas_obstacle-entity out of that brush.

The obstacle touches the door and is targeted by the door.

Edited by OGDA
Link to post
Share on other sites

Further findings:


- only the texture aasobstacle is working (aassolid is not)

- Rats completely ignore the obstacle

- A city watch guard doesn't enter the obstacle (which has start_on = 1), but as soon as the obstacle has been triggered it never goes back to active.

- The guard doesn't leave the obstacle once the door closes again (point above) and when I lure the guard outside the area and reenter it he still follows me (it has nothing do with that he would be already inside the block)


It seems I can't get the block to trigger on again by closing the door, once it has been deactivated by the door opening.

Any other idea how I can prevent the rats from going the door without specific waypoints and not blocking the room for other ai?

Edited by OGDA
Link to post
Share on other sites

Don't rats have their own custom monsterclip? I'm probably misremembering, but I thought there was something specific to keep rats from going places that other AI could go.

Link to post
Share on other sites

I can't find a related texture for rat monster clips.


However there is an entity

td_defs01.pk4 > AI > AAS_flood > aas_rat_flood



This will generate AAS for rats.


Is this relevant for my problem and how do I use this?

Link to post
Share on other sites

I have also not seen any rat-specific clip texture.

The aas_flood entities are necessary for areas, where no AI are present at map start, but AI can reach it later on (e.g. with an elevator) or AI are supposed to be teleported there, so it is not connected to your problem.

Link to post
Share on other sites

Monsterclip blocks all pathfinding defs. I don't think you can choose here.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...