Jump to content
The Dark Mod Forums

Request for a pressure plate script.


kingsal

Recommended Posts

Hello!

 

Having an entity class for pressure plates would be great (if one doesn't already exist that I don't know about). Biker helped me get a basic multi_trigger pressure plate going which works in most cases.

 

However, I am wondering if anyone has written a script or would be willing to write a script for a generic pressure plate that calculates weight. I could see FM's making use of this.

 

I imagine the plate would compress when the player or any moveable above a certain mass sits on top of it and decompress when those items are removed. It would likely need to be able to rule out certain classes like broken arrow heads or mines, probably by mass. I don't think its necessary for the plate to add up the weight of the objects, but it might be a nice to have.

 

Any thoughts or suggestions? I can do the set-up and testing if anyone is interested.

 

IndianaJones744075_1024_768.jpg

Edited by kingsal
Link to comment
Share on other sites

The gatehouse was a trigger touch volume that calculates when a moveable or player is within its boundaries? Currently, I think that's the best way to do it. Remind me where it is in PD3, and I'll check that one out. I couldn't find it.

 

I was thinking of a pressure plate that is triggered by the mass of an object(s). In the case of a floor trap, this will help prevent a bunch of random stuff from happening. For instance a rat runs across it, or a broken arrow head moveable touches it. Things of that nature. I don't think it needs to be a physics simulation or anything like that, but having more control over it would be nice.

Link to comment
Share on other sites

The gatehouse was a trigger touch volume that calculates when a moveable or player is within its boundaries? Currently, I think that's the best way to do it. Remind me where it is in PD3, and I'll check that one out. I couldn't find it.

 

I was thinking of a pressure plate that is triggered by the mass of an object(s). In the case of a floor trap, this will help prevent a bunch of random stuff from happening. For instance a rat runs across it, or a broken arrow head moveable touches it. Things of that nature. I don't think it needs to be a physics simulation or anything like that, but having more control over it would be nice.

There are 2 in PD3, weapons shop and a somewhere else that's super secret...

Link to comment
Share on other sites

Ah got it, yeah both of those are using trigger_multiple's that detect if anything is in its bounds and a toggle script. This is a good way to do it.

 

I was hoping for something that will react to a moveable's mass. Similar to the the pressure plates in T1 Down in the Bonehoard.

Here is a screenshot of that:

https://www.dropbox.com/s/6evrrscyejeshmq/dump079.png?dl=0

 

Scripting something like this is way out of my league... I imagine you would grab the mass of any object within its bounds and compress the plate when its reached its weight limit (which could be set as a spawnarg)

Link to comment
Share on other sites

Yes! Obsttorte to the rescue. I figured there was something out there for this. Looks like it will do exactly what I am looking for.

Edited by kingsal
Link to comment
Share on other sites

This is a very old thread and the things I've posted there are quiet buggy. I wouldn't do it like that anymore.

 

The problem was that taking mass into account was a bit of an issue due to the way the idTech physics work. I've experimented with other approaches from time to time but were never able to come up with a convenient solution.

 

So hacks like trigger touches and/or scripts are still the way to go.

 

It would be awesome to have support for entities that reacts depending on the amount of force applied to them, but this would require additional code added. A bit unlikely in the near future considering our lack of programmers.

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 comment
Share on other sites

Hmm. Yeah the doom physics can be unreliable which makes this stuff a little tricky. Maybe it is better to go with a trigger touch + some tweaks.

 

What was the specific problem? Did the objects not react to the plate lowering? Impulses are finicky in doom.

 

I definitely think your script could work for this. I'll load it up and see if I can get a working example of a pressure plate trap. I might fail, but its worth a try.

Link to comment
Share on other sites

What was the specific problem? Did the objects not react to the plate lowering? Impulses are finicky in doom.

On the one side the engine does not perform a good physical simulation, everything is only roughly calculated, on the other side physical objects are set inactive once they come to rest, and remain in that state as long as no force is applied. This is mainly due to performance considerations. Doom 3 didn't contain any physics puzzles or similar, just some stuff been thrown around due to explosions or similar. So for the programmers of the engine there was no need to implement an accurate physics simulation.

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...