Jump to content
The Dark Mod Forums
Sign in to follow this  
Dragofer

The Trap Workshop

Recommended Posts

Prior discussion from the Flame Jet thread:

 

Well, here are a few I was thinking about looking into in the future:

 

1. Crushing walls

 

2. Spiked pits

 

3. Rooms filling with water (Sotha did that in a mission already)

 

4. A Dishonored type lightning trap

 

5. Something like the Thief heads that fire projectiles (probably would require an AI def)

 

6. Poison gas traps (ideally that could be avoided with breath potions)

  • These could be problematic if moveables come into play, as a few crates for example could be used to block the whole setup (which may be desirable). They could be setup to take damage as well, but this would make the whole setup very sensitive on how mappers are using it.
  • Insta-kill?! A trigger_hurt dealing a sufficiently high amount of damage.
  • Did that in Old Habits 2, too. It is surprisingly easy to setup (a water volume bound to a mover, a door for example). You need it to rise from below, though, so if there is no space left it gets difficult.
  • The most difficult part here is the look of it. Projectiles support light trails, though, so particles left on the trail of the projectile fired. One just has to make sure that performance doesn't suffer too much from it.
  • The security camera could potentially be used here. It provides a visibility scan without all the additional extra load an ai normally uses (pathfinding for example).
  • That pretty much goes into the direction of the gas mine Sotha created a while back. If you are using the same gas as used there and by the gas arrow, breath potions will help.
The latter is relatively simple. The main problem is that once moveables come to rest, they will not move until they get an impulse from the outside reactivating them (that is for performance reasons). A translating door placed on top of the boulders that moves a bit to give them a little push would bypass this, but may not be a houndred percent relyable. Swinging blades would call for func_pendulums, but similar to the traps Springheel already set up the way damage is delivered to the entity hit has to be dealt with.

 

Can you point me to that? I tried to make some "poison gas" areas, that would drain the air from the player and had massive problems as I found no way of damaging the "air bar" of the player. The only way I found was to create a hidden room with a vaccum entity inside that I could regulate by opening and closing doors. This was still prone to errors as the whole area is evacuated and would affect AIs, where it should not. I am just curious how the setup of Sotha's trap is and how it regulates that the air potion helps against the trap

Share this post


Link to post
Share on other sites

[Crushing Walls]

To begin with, something I'd like to point towards is the concept of Wiki: Force Fields. This may be used to supplement traps where their natural physics don't achieve the desired effect, i.e. when crushing walls would get blocked by moveables.

 

Also, s_shakes can be applied to speakers to get the screen to rumble while the walls are moving. A value from 0 to 1 can be set, the higher the stronger the shaking. If your sound is in .ogg format you'll get warning messages in the console, but as I remember it'll still work alright.

Edited by Dragofer

Share this post


Link to post
Share on other sites

s_shakes resembles a earthquake in visual representation on a monitor when in game, the viewscreen shakes. Had it in an unreleased map, but I think I removed it because it was a very violent shake, even at a low setting.

Share this post


Link to post
Share on other sites

I wonder if crushing walls trap could have simple script that detects moveables in the trap space and removes them when the trap is triggered. Add a dust puff particle effect when the walls start to move which would conceal the disappearance of the moveables.

Share this post


Link to post
Share on other sites

I wonder if crushing walls trap could have simple script that detects moveables in the trap space and removes them when the trap is triggered. Add a dust puff particle effect when the walls start to move which would conceal the disappearance of the moveables.

That would certainly be possible, trigger_touch can detect all entities and their properties within it's volume. In a different context I've recently made a setup which runs a teleportation script on the moveable.

 

Could for example check if the length of the moveable (along the trap's axis) is equal to the current distance between the 2 walls. If yes, remove it + play a sound + spawn a particle.

 

s_shakes resembles a earthquake in visual representation on a monitor when in game, the viewscreen shakes. Had it in an unreleased map, but I think I removed it because it was a very violent shake, even at a low setting.

I ran into the issue of too strong s_shakes once. I don't exactly recall the fix, but it'd be good practice to re-export the sound as a .wav Edited by Dragofer

Share this post


Link to post
Share on other sites

Moveables are able to receive damage and could be removed upon "death". The problem is that this is not the default behaviour (by default they can't get killed) and therefore the mapper has to think of this. In addition, several moveables touching each other can cause the whole chain of objects involved immovable due to how the idTech4 physics work. Using trigger_touch may not be desireable either, as it can become performance-houngry on bigger maps and if several of those are used.

 

It would probably be the easiest way to go if mappers would avoid moveables in such a scenario. Additionally it may be a heavely scripted usecase anyways, as a plain room with a crushing wall isn't that appealing. Crushing ceilings might be less of a problem in all regards.

Share this post


Link to post
Share on other sites

Indeed, a crushing ceiling would be the easier version of the crushing wall as you can use gravity to clear out the moveables. You might still find clever players who stack crates up high to block it, so it's still not immune by nature. How would you go about preventing moveables from entering the room?

 

Regarding trigger_touch, it's possible to toggle their activity so the perf impact fortunately wouldn't scale with the trap count.

Share this post


Link to post
Share on other sites

Electrified/heated floor plates would be another fairly easy-to-implement trap type, methinks (I believe The Accountant 1 already managed to do the former). Just a damage brush that toggles on and off, with some particle effects for show? The latter might be more difficult if you're talking about gradually transitioning from a self lit skin to an unlit skin (don't know if that's doable or not).

Share this post


Link to post
Share on other sites

 


The latter [heat plates] might be more difficult if you're talking about gradually transitioning from a self lit skin to an unlit skin

That's the easy part ;)

Share this post


Link to post
Share on other sites

s_shakes resembles a earthquake in visual representation on a monitor when in game, the viewscreen shakes. Had it in an unreleased map, but I think I removed it because it was a very violent shake, even at a low setting.

 

 

...

 

I ran into the issue of too strong s_shakes once. I don't exactly recall the fix, but it'd be good practice to re-export the sound as a .wav

 

Yes s_shake, unless TDM team changed it, requires wav files.

 

From idsoftware site https://www.iddevnet.com/doom3/sounds.php

 

Shake the screen when this sound plays. The shake intensity is volume multiplied by [float] (which defaults to 1)

*Should not be used with .ogg files*

 

Share this post


Link to post
Share on other sites

Can't a pressure plate trap be made using a door? I tried making it and the pressure plate part works, I'm just not yet knowledged enough to make it trigger something else.

 

I did this a week or two ago, I'm not sure I made it activate through touch or with a flat trigger brush on top of it.

Share this post


Link to post
Share on other sites

Now when we have working security cameras I was hoping to have a shooter bound to it, but it won't work (shooter don't shoot in other direction than starting one, also camera triggers its targets only when alerted, but not when resuming sweeping). Also there is a spotlight mentioned in camera's args, but I don't see any light coming out.

Anyone trying to make a Thief2 style shooting turret maybe?

  • Like 1

Share this post


Link to post
Share on other sites

I don't know what the problem with the spotlight is offhand; I'm not sure what kind of testing the existing def got. 2.07 was supposed to get an updated version with Epifire's model but it was left out by mistake. See recent comments on http://bugs.thedarkmod.com/view.php?id=4731

 

The Doom 3 turret was a scripted AI, I believe.

 

According to my notes on the security camera, it's supposed to update parm7 according to its state (I haven't tested), so maybe a script could check for that.

Share this post


Link to post
Share on other sites

How to use a hidden securitycamera to trigger a something like a trap or an alarm:

 

The funk_securitycamera can trigger anything triggerable just using clrl + k (first select the camera, then what is has to trigger and then press ctrl + k), and it can look through a patch ^^ .. so can be hidden.

 

I made a little setup with the funk_securitycamera and a statue that guards the place:

https://streamable.com/aqht0 - soundlevel is low - the thing covering the camera is a simple patch.

https://ufile.io/750gxqeb - .map file.

 

 

So the eyes I made there are really ugly but there is a purpouse to have eyes that are clearly visible and light up: the player is warned that something is watching.

  • Like 1

Share this post


Link to post
Share on other sites

An other way to hide a security camera I got from VanishedOne just makes the camera invisible, so you can use it anywhere:

 

If you save this to /skins/ as a text file with a .skin extension it should override TDM's built-ins for the security camera:

 

skin security_camera_on {
* textures/common/nodrawsolid
}

skin security_camera_on_spotlight_off {
* textures/common/nodrawsolid
}

Share this post


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.

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

Sign in to follow this  

×
×
  • Create New...