Jump to content
The Dark Mod Forums

Making a ball and chain trap


Springheel

Recommended Posts

I'd like to create a classic trap where you step on a pressure plate and a spiked ball on a chain comes swinging down at you.

 

I've already made the ragdoll chain, attached the spiked ball model, and have the damage stim set up so the player is hurt when they touch the ball.

 

What I'd like help with is how to get the ball suspended in the air until the player steps on the right spot. What would people suggest?

Link to comment
Share on other sites

I'd suggest: Create a mover which holds the ball in place and starts out stationary. When it gets triggered by the pressure plate, it moves to the side, allowing the ball to fall down. I'm not sure if it's possible to set this up without scripting.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I was thinking about something similar, except I wondered if the brush holding the ball up could be destroyed or teleported away.

Link to comment
Share on other sites

Yes, you could use a func_entity to do that, maybe in combination with stim/response. That was my first thought as well, actually. I just thought it would make more sense for an object to slide out of the way. That's how I'd set up a real ball-and-chain trap.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

In Patently Dangerous, you'll remember, I hung a guy on a ceiling-attached-chain in the warehouse closet. I remember there was something you had to get right with what attaches to what (like the guy to the chain, not the chain to the guy), but now I forget and it's easier to just open it up in DR and look at it. That's about the only direct experience I can think of, and I don't know if it helps any.

 

Well, I think I remember there was something a little odd that the chain didn't fall out of the ceiling, since I think I just planted it there without any special attachment, so that might be relevant. I didn't try destroying the brush holding it though (obviously)!

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Yeah, there's no problem with the chain...the origin stays anchored wherever you put it (actually, there may be a slight problem if the origin is inside another object or brush).

 

Yes, you could use a func_entity to do that, maybe in combination with stim/response

 

Any idea how? I'm pretty clueless about triggering things.

 

Hmm, and then there's the trick of getting the ball up onto the brush to begin with. How do you position ragdolls in game again?

Link to comment
Share on other sites

Any idea how? I'm pretty clueless about triggering things.

I'm not a trigger/S&R expert either, but I imagine you'd create a mover called "chain_release_mover" in the appropriate position, and set up a trigger_once (or whatever kind of trigger you wanted) with "target" "chain_release_mover". Set up a Response on the mover (in DarkRadiant, open the Entity menu and choose Stim/Response) of type Trigger, and add a Response Effect of type "Move to Position". Set the Entity to _SELF, tick "Relative to old origin", and enter some reasonable values in Position like "128 0 0". When the trigger gets triggered, the mover slides away, allowing the ball to fall.

 

Hmm, and then there's the trick of getting the ball up onto the brush to begin with. How do you position ragdolls in game again?

Here: http://forums.thedarkmod.com/topic/6677-guide-to-ingame-moveable-and-ragdoll-editing/page__hl__g_dragentity__fromsearch__1

 

Hmm, that's an internal thread. It should go on the wiki.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

Not followed or thought about this in detail but I'd work with what is easy and familiar. I'd set up a visible catch/bolt (brush/patch) to hold back the ball and make it a translating door entity and add frobable 0 (there's also a no AI use property but probably not important here if it's out of the way.)

 

Trigger_once brush over the pressure plate targetting the door. Probably surround that with monster clip else it would look odd if AI run across it. (alternative: possibly let the trap damage AI too.)

 

[EDIT] In fact I'd make it trigger multi so if the player survives he can trigger it again to see how the bolt moves. Also make the pressure plate a translating door that moves down slightly also targetting by the multi. The player walks over it and it depresses. Make it auto-close so it pops back up (mmm needs some thought as it wants to pop up after the player steps off.) Maybe easier to make it a no frob button which just flips down and back. If the player's weight blocks it I don't think it's serious. Each time the player steps on it then it should give some response that looks reasonable.

Link to comment
Share on other sites

(alternative: possibly let the trap damage AI too.)

 

Yes, one of the neat things is that it damages AI as well. The player can even grab the ball and swing it at an AI. It will need a monsterclip brush to stop them from just walking into it though.

 

I'll give these ideas a try tonight and see how it works.

Link to comment
Share on other sites

Ok, this is kind of a newb question, but how the heck do you make a trigger? I can't find anything about it on the wiki, and making a brush and trying to change its entityclass to trigger_once doesn't seem to do anything. I think in the past I've just copied and pasted triggers from other maps, but it would be nice to learn how to do it myself.

Link to comment
Share on other sites

Ok, this is kind of a newb question, but how the heck do you make a trigger? I can't find anything about it on the wiki, and making a brush and trying to change its entityclass to trigger_once doesn't seem to do anything. I think in the past I've just copied and pasted triggers from other maps, but it would be nice to learn how to do it myself.

 

Create brush, select it, then press right-click, choose "create entity" and select the trigger? (or was it "choose make func_static"? sorry, forgot)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

That's what I did, but nothing happens. Does the brush have to be textured with a specific texture first?

Link to comment
Share on other sites

That's what I did, but nothing happens. Does the brush have to be textured with a specific texture first?

 

No, it will afterwards have a "trigger_xxx" texture. Did you link the trigger to the target? (select both, then select "link entities" from the menu, a line should be drawn between them with an arrow pointing to the target).

 

Oh, and the player cannot stand in the trigger at map start (he can but it wont trigger), that will only trigger it if you move out and in it again.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

That's one way to do it. You'd want to tweak the open_time value to look right. But then the plate wouldn't come back up when you get off it (if it's a trigger-once, and if it's a trigger multiple, it's going to be going up and down while you stand there.) That maybe okay for a one-off trap like this, but wouldn't be good for like an arrow-shoot trap.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Create brush, select it, then press right-click, choose "create entity" and select the trigger? (or was it "choose make func_static"? sorry, forgot)

 

Oh, I know what I was doing wrong. I was right-clicking on the *classname* and then selecting trigger_once, which didn't do anything. Right-clicking on the actual brush worked. :blush:

Link to comment
Share on other sites

Not wishing to intrude but I got interested in making a general purpose pressure plate. I've now got this working and I'll upload a test map later. It goes down when you step on it and back up when you step off and can target whatever you want either stepping on or off. This could also be used for a Raiders of the Lost Ark type object trap where an object is already on the pressure plate and if removed it will trigger something. This could also be set so placing another item in its place would prevent the trap (not tested yet so may be timing random failure or may need to place second item before removing first.)

Link to comment
Share on other sites

  • 2 weeks later...

Yeah, take a look at HERE

 

It's only a rough experiment. As I recall I used some trigger brush on the mover floor plate that targets the plate so it can also target anything else. It works well enough.

 

Another idea I had but not tried nor know if it would work would be a very shallow pit with a force field slightly less than the player weight. So the player steps in but say, placing a small object would not be heavy enough but a big barrel might. In the pit would also be the trigger brush as before and the actual tile plate that is a mover up and down.

 

The Indiana Jones loot on the pedestal does not work so well. You are supposed to grab the loot then place the rock on the pedestal before the timer brings up the pedestal. Not perfected yet. And it triggers just holding the rock over the pedestal.

 

There is no real 'weight' physics that I know of yet.

 

You are welcome to us any part of the idea. Let us know if you come up with something better.

Link to comment
Share on other sites

@Fidcal, that sounds like an excellent thing to have as a general prefab. As for the Indiana Jones stuff, you're correct that it all has to be faked, there is no real weight physics (and probably won't be in this engine).

 

That doesn't mean that it can't be faked, though, like with a specific object that you want to set down, or maybe a script that adds a stim to moveables brought within the vicinity of the pressure plate (for performance reasons it would be bad to have a stim constantly running on all moveables in the map). From what you've said it sounds like you're using a normal area-based stim. I would try a collision stim in combination with a normal area stim (maybe using a hidden objective to get the conditions right). I.e, did the thing just physically hit the pressure plate, and is it still in the right area.

 

You might also be able to get away with just a standard stim if the stim/response radii fit very tightly around the objects. You can select "use bounds" for the stim radius to make sure the stim bounds only extend out to the object bounds, and should be able to get it within about 1 inch that way.

Link to comment
Share on other sites

No, on revisiting to remind myself how I did it I see I'm using your excellent objectives code as control devices with a info_tdm_objective_location and the plate is a multi_state mover (which is the basis for the elevator.) :) It detects only the player but I'm sure it can be modified to detect say, heavy moveabls. I recall a Thief FM where such a plate opened a gateway but it timed out and closed before you could reach it. You had find a barrel or boulder or something and push it on the plate.

 

It uses a tiny info_tdm_objective_location cube with a rapid 0.1 test interval. I reasoned that such a tiny cube would not affect performance like a huge street-filling brush.

 

Yes, I had planned to make it a prefab but ran out of time to fully develop it and there was no interest shown in it so it got shelved. :(

 

Another idea I tried long ago was water - a tiny raft plate floated on water. I thought standing on it that that it ought to sink a little deeper but it was bouncing around on the surface so much I never got very far. :)

 

I never quite fathomed out how a there can be a radius stim *and* a bounds on a brush. I had problems with the big hammer in Saint Lucia. With hindsight I think I would have used an objective control device instead.

Link to comment
Share on other sites

Yes, I had planned to make it a prefab but ran out of time to fully develop it and there was no interest shown in it so it got shelved. :(

Well, I'm sure we'll get a prefab out of it eventually. :)

 

Another idea I tried long ago was water - a tiny raft plate floated on water. I thought standing on it that that it ought to sink a little deeper but it was bouncing around on the surface so much I never got very far. :)

I also tried it with "real" physics using a moveable plate and a few springs and a shaft, but it was too buggy to work reliably, and I kept having problems like the plate would get jammed on one of the sides and not pop back up. D3 physics seems to cut a few too may corners to make it work reliably. (For example, contact points aren't always at the point that actually should be making contact)

 

I never quite fathomed out how a there can be a radius stim *and* a bounds on a brush. I had problems with the big hammer in Saint Lucia. With hindsight I think I would have used an objective control device instead.

It's two separate collision models on the same object, if I remember right. One is used only for stim/response. It might only exist at the time the stim response test is being done, I forget.
Link to comment
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.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...