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

    • 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.
      · 2 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...