Popular Post Dragofer 1481 Posted August 21, 2018 Popular Post Report Share Posted August 21, 2018 After the recent slew of traps and trap concepts I reckoned it'd be good to have a place where they could all be collected. Ready-to-use Traps Pressure plate with projectile shooter Thread Video tutorial Chest armed with springloaded spike Thread Video tutorial Flame Jet Thread Video tutorial Tripwire with crossbow Thread Video demonstration Trap concepts Here are possible future traps that the community has thought of. Feel free to post ideas for how any of these could be implemented, have a go at implementing them or to make new suggestions. It'd be helpful to start each of your post with the name of the trap you're writing about. 1. Crushing walls 2. Spiked pits 3. Rooms filling with water Existing examples can be found in Old Habits 2 and one of Sotha's missions. 4. A Dishonored-type lightning trap 5. Thief-like heads that fire projectiles Probably would require an AI def. 6. Poison gas traps Ideally these could be avoided with breath potions. Sotha's gas mine may be used as a basis. 7. Swinging blades 8. Boulder drop See the spiky balls in the Gatehouse for an existing setup. 9. Trapdoor/pitfall Either an unstable floor, made as in the Pressure Plate trap, or a trapdoor which suddenly opens when triggered. 10. Electric or heated plates 9 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge | Co-FM: The Painter's Wife Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Dragofer 1481 Posted August 21, 2018 Author Report Share Posted August 21, 2018 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 traphttp://forums.thedarkmod.com/topic/14823-the-custom-mine-thread/ Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge | Co-FM: The Painter's Wife Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Dragofer 1481 Posted August 21, 2018 Author Report Share Posted August 21, 2018 (edited) [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 August 21, 2018 by Dragofer Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge | Co-FM: The Painter's Wife Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
stumpy 243 Posted August 21, 2018 Report Share Posted August 21, 2018 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. Quote Link to post Share on other sites
Sotha 1909 Posted August 21, 2018 Report Share Posted August 21, 2018 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. Quote Clipper-The mapper's best friend. Link to post Share on other sites
Dragofer 1481 Posted August 21, 2018 Author Report Share Posted August 21, 2018 (edited) 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 August 21, 2018 by Dragofer Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge | Co-FM: The Painter's Wife Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Obsttorte 1556 Posted August 21, 2018 Report Share Posted August 21, 2018 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. Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild 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
Dragofer 1481 Posted August 21, 2018 Author Report Share Posted August 21, 2018 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. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge | Co-FM: The Painter's Wife Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide Link to post Share on other sites
Springheel 4674 Posted August 21, 2018 Report Share Posted August 21, 2018 If a player stacks crates to block it, I'd say let them. That would be a reasonable way to disable the trap. Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
Aosys 237 Posted August 22, 2018 Report Share Posted August 22, 2018 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). Quote Link to post Share on other sites
Springheel 4674 Posted August 22, 2018 Report Share Posted August 22, 2018 Just a damage brush that toggles on and off, You'll run into the same problem I summarized elsewhere: http://forums.thedarkmod.com/topic/19597-flame-jet-trap/?p=426179 1 Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps Link to post Share on other sites
Obsttorte 1556 Posted August 22, 2018 Report Share Posted August 22, 2018 The latter [heat plates] might be more difficult if you're talking about gradually transitioning from a self lit skin to an unlit skinThat's the easy part Quote FM's: Builder Roads, Old Habits, Old Habits Rebuild 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
Destined 631 Posted October 14, 2018 Report Share Posted October 14, 2018 I have added the list of traps to the Wiki, so it can be found easier than in this thread. 1 Quote Link to post Share on other sites
HMart 343 Posted October 14, 2018 Report Share Posted October 14, 2018 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* Quote Link to post Share on other sites
Skaruts 65 Posted October 15, 2018 Report Share Posted October 15, 2018 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. Quote Link to post Share on other sites
VanishedOne 550 Posted October 15, 2018 Report Share Posted October 15, 2018 There are probably a few different ways to implement a basic pressure plate that triggers when the player stands on it; it's fancier implementations that run into trouble with e.g. the diagrams in http://forums.thedarkmod.com/topic/14017-making-traps/page-2?do=findComment&comment=294561 Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
ERH+ 662 Posted March 14, 2019 Report Share Posted March 14, 2019 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? 1 Quote Link to post Share on other sites
VanishedOne 550 Posted March 14, 2019 Report Share Posted March 14, 2019 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. Quote Some things I'm repeatedly thinking about... - louder scream when you're dying Link to post Share on other sites
STRUNK 271 Posted June 2, 2019 Report Share Posted June 2, 2019 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. 2 Quote Link to post Share on other sites
STRUNK 271 Posted June 7, 2019 Report Share Posted June 7, 2019 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} Quote Link to post Share on other sites
Popular Post STRUNK 271 Posted January 9, 2020 Popular Post Report Share Posted January 9, 2020 (edited) The Turret. VIDEO The Turret works with a little script with 2 functions in it. These functions are called by "atdm:target_callscriptfunction"s (the yellow cubes in the picture) and are triggered by "trigger_timer"s (the purple cubes in the picture). "trigger_timer"s can be triggered on and of by other triggers. In the spoiler I put the script, with, i hope, as many information you need to understand a bit what is going on, so you can adjust it to your needs. You can use the script as is and give your own entities the same names as the entities in the script. (Script is also in the Turret.pk4) Spoiler void MoveToPlayer() { //Makes $BindToThis move to $player1 and back to &ReturnToThis, and triggers speakers and func_emiters on and off //This function is triggerd/called by an atdm:target_callscriptfunction //All speakers, func_emitters and the trigger_hurt need spawnarg "bind" "BindToThis" to follow entity "BindToThis" (func_mover) float distance = $ReturnToThis.distanceTo($player1); //Defines that float (number) "distance" will be the distance between entity "the player" (is always $player1) //and entity "ReturnToThis". $ in the script means entity. vector head = $player1.getEyePos(); //Defines that vector (3 numbers) "head" wil be the position of the eyes of the player. $BindToThis.time (distance/750); //Sets the time entity "BindToThis" (func_mover) takes to travel to it's new position. Changing "750" will change the speed. sys.trigger($ProjectileFx1); //Triggers entity "ProjectileFx1" (func_emitter) and activates it. // --- Func_emitters need spawnarg "start_off" "1" to be incative at game start. --- sys.trigger($ProjectileFx); //Triggers entity "ProjectileFx" (func_emitter) and activates it. sys.trigger($Sound1); //Triggers entity "Sound1" (speaker) and activates it. //This speaker plays the sound you hear when entity "BindToThis" is moving. // --- Speakers need the spawnarg "s_waitfortrigger" "1" to be inactive at game start. --- sys.trigger($Hurt); //Triggers entity "Hurt" (trigger_hurt) and activates it. // --- Trigger_hurt needs the spawnarg "on" "0" to be inactive at game start. --- $BindToThis.moveToPos(head); //Tells entity "BindToThis" (func_mover) to move to it's new position "head", //that was earlier in the script defined as the position of the players eyes. sys.wait(distance/750-(distance/750-(distance-11)/750)); //Tells the script to wait distance/750-(distance/750-(distance-11)/750) seconds before going to the next line. //The calculation is meant to wait for the total move time, //minus the time it takes to move 11 doom units at the same speed. $BindToThis.stopMoving(); //Tells entity "BindToThis" (func_mover) to stop moving. //Due to the calculation before this, it stops about 11 doom units in front of the players eyes sys.trigger($ProjectileFx1); //Triggers entity "ProjectileFx1" (func_emitter) again and deactivates it. sys.trigger($ProjectileFx); //Triggers entity "ProjectileFx" (func_emitter) again and deactivates it. sys.trigger($Sound2); //Triggers entity "Sound2" (speaker) and activates it. //This speaker plays the sound of an explosion. sys.wait(0.3); //Tells the script to wait 0.3 seconds before going to the next line. sys.trigger($Sound1); //Triggers entity "Sound1" (speaker) again and deactivates it. sys.trigger($Hurt); //Triggers entity "Hurt" (trigger_hurt) again and deactivates it. sys.wait(2); //Tells the script to wait 1.5 seconds before going to the next line. //Particle effect (from func_emitters) tend to "fade_out" after being deactivated. //This wait time is needed to prevent them from still being visable when they return to the start position. $BindToThis.moveTo($ReturnToThis); //Tells entity "BindToThis" (func_mover) to move back to entity "ReturnToThis" (func_static). } void LookAtPlayer() { //Makes $Statue turn towards $player1 //This function is triggerd/called by a atdm:target_callscriptfunction vector direction=$Statue.getOrigin()-$player1.getOrigin(); //Defines that vector (3 numbers) "direction" wil be the origin/position of entity "Statue" (func_static) //minus the origin/position of the player. direction_z=0; //Defines that the value of z in the vector "direction" is 0 $Statue.setAngles(sys.VecToAngles(-direction)+'0 90 0'); //Sets the rotation of entity "Statue" to sys.VecToAngles(-direction)+'0 90 0' //I don't know what this calculation does, but it works. //I got it out of Obsttorte's looking statue script. } In the Turret.pk4 is the mission folder with in it the map folder and the sound folder. In the map folder is the Turret.map file and the Turret.script file. They both have to have the same name otherwise the script won't load, and won't work. In the sound folder is the soundshader Turret.sndshd that is needed for the custom explosion sound I made (from a thundersound that is already in the game) to be loaded. A soundshader file is actually very simple to make, and adding custom sounds to your map is therefor very easy. The audiofile is in the sfx folder, that's also in the sound folder. Questions? Ask them. Have fun : ) Turret.pk4 Edited January 9, 2020 by STRUNK 5 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.