Closed MonkeyFrogStudio closed 10 months ago
@Necrym59 What is the file? Slider? Is it for a sliding door? If so, thanks. But my request is for something larger. I have a lot of uses for triggers in general and need them to work as a trigger volume, sort of like the Plrinzone, but that Behaviour removes the zone after it does it job. I need a permanent zone that is there to always do it's job. ;)
I really appreciate it. I really do. What I actually want is for TGC to implement a solution that all of us can use within MAX. Even if it's a Behaviour that works similar to the Plrinzone behavior, but doesn't remove the zone afterward. That way the zone can be used to trigger events of all kinds and be sized.
However, having the ability to use a trigger volume, which is pretty standard in most game engines, is preferred. You could use any geometric shape and it's boundary would be the volume that determines the trigger area. As long as the player is touching or within this volume, they can trigger whatever event is associated with the volume, whether that's an automatic door, a door that opens by key press, triggering the spawning of enemies, causing a message to play, springing a trap, alerting enemies, etc. Trigger volumes are quite versatile. But my current experiments show that bringing in geometry in an attempt to use as trigger volumes is not exactly working properly because it appears that MAX is using the volume's center instead of it's boundary. Thus, my request. :)
I'll start by saying, you rock! Thanks, really.
However, no. That's close. It sort of does what I want, but not quite. Because I can attach the marker behaviour you've created to the volume as a trigger, I cannot assign another behavior to it. For example, what if I want this area to act as a switch (i.e. use the Switch Behaviour while the player is inside the volume)? If Trigger volumes simply ... worked (i.e. MAX recognized the boundaries and not just the center) ... then I could use any of the stock Behaviours without worry.
With your solution, I hooked the my custom trigger volume up to a sliding door. With Toggle, the door opened and closed automatically over and over and over without the player being anywhere near the volume. With Activate, the door opened once without the player having entered the volume. So, the player didn't have to enter the volume for it to trigger the sliding door Behavior in this instance. By connecting the marker/volume to the door, it just opened.
Perhaps I am doing something incorrectly?
Don't get me wrong. It's really awesome that you're trying to help. I just think that if Trigger Volumes were an actual thing in MAX, then they would work out-of-the-box with MAX's standard Behaviours.
@Necrym59 You are amazing and so is this script! Thank you so very much! I love the automatic part, so I can have events happen just by the player entering the volume.
Having said that, the Behavior does seem a bit buggy. There are two things I've noticed already:
1 - On manual mode I get the message "E to switch on" and can activate the door from very, very far away from the actual volume ... and I've not even scaled the volume in this test. I can create a video, if you'd like to see it.
2 - After doing a test and switching to Automatic Mode and then back to Manual Mode, the script refused to work in Manual Mode. A restart of MAX caused it to work again.
This is amazing work and makes me jealous that I have such a huge mental block when it comes to coding. Thank you again for your effort. This should become a standard part of MAX, imo.
Ill have a look at it, Max can hold on to things in its cache i have noticed sometimes a save/reload or at worst rest fixes it, yeah please send me a vid link so i can debug it. I think it could be a good addition to max.
Here's the video:
Now, in this case, I couldn't get manual to work (pressing "E" would not open the door), even with a restart, but automatic was working ... though from a great distance (and all the way up to the door). But you can see when the Open message was appearing (and disappearing). When manual does work, it works like automatic ... from a great distance away.
In another test level, it was working from around a corner, indicating that the trigger volume was really large in all directions.
@Necrym59 This one is also opening from very far away despite the size of the trigger volume, both in automatic and manual mode.
Do you mean "Switched on"? No, I don't have that checked.
OK this one is better for now, we have to lose the invisibility or there is nothing to check collisions with so just make it invisible with alpha clipping in materials. Also added a range limiter for tweaking far activation which shouldnt happen now anyway. I will have to do some deeper checking for extraneous collisions and will work on it. Give this a go trigvolume_v4.zip
Is it ok if I try this !
@Necrym59 This is mostly working. I still get the "E to switch ON" text at "random" intervals as I approach the Trigger Volume going down the long hall. And when on automatic, there's one area before the volume that actually opens the door and then closes it, all before I actually get to the trigger volume. Other than that, it works great!
I'll do a video of what it's doing ... be just a moment.
Here they are:
As you can see, on automatic, the door rises early at one spot. On manual, the message shows up several times way before the player gets to the trigger volume.
Fortunately, for me, I don't care about the message one on manual because I don't like them. I like having no message and the player having to just try doors to see if they open or not using whatever the designated action key is. ;)
@Granada1 - I certainly don't mind. I believe that @Necrym59 made this for anyone, not just me.
👍
@Necrym59 There are other issues I am running into with this. I tried using this to automatically open the door, then close it on the opposite side. Exiting the volume does not trigger the toggle. So, I tried attaching a second Trigger volume (one to one side and one to the other) to toggle the door state. For whatever reason, the second one would not do anything. It just wouldn't work.
A nice feature to have (perhaps a check box or some such) would be an Entry and Exit state. So, toggle the state on Entry of the volume and toggle again on Exit of the volume. This way, one Trigger Volume could be used for something like an automatic door. The Trigger Volume would be positioned centered on the door, but extended outward beyond the front and the back, far enough for the player to interact with it before encountering the door from either end. As they approach the door, they Enter the Trigger Volume and it toggles the state of the door (it opens). After the player goes through the door, on the other side, they Exit the Trigger Volume, toggling the state of the door again (it closes).
EDIT - In most game engines, Trigger Volumes have THREE states that are tracked or can be used:
With these three, it enable the end-user to configure events for any of them - X happens when player ENTERS the trigger volume, X happens when player EXITS the trigger volume, or X happens only while the player REMAINS INSIDE the trigger volume. The first two are the most common ones used, though.
The manual side of this is working great ... other than the random "E to switch ON" text ... which I've turned off. ;)
Again, thank you so very much for creating this!
HI Argent V5 for your appraisal trigvolume_v5.zip Modes now are
Thanks! You rock!
Hopefully its functional all i have to do now is tidy it up a bit and do some scale checks etc.
Have you tested this on the latest MAX build? For whatever reason, it's not working at all. I've even restarted MAX a few times. I'll test some more.
just downloading now ill check it over
Yeah, I can't get manual mode to work at all. In fact, none of the On Text/Off Text is even showing up.
hmm try deleting the offending box and put a fresh one in then resave some times max hangs onto things but let me check first after ive downloaded the updatet incase they broke somthing :)
I've done that as well. Several times. I even started a fresh project with just a door and the new trigger volume in it. It won't work. :)
OK ill investigate:) you still have the previous one
Hey Argent can you send me a sample map with a corrior or door your using so i can test it
Sorry. I was away from my PC. Give me a moment and I will send you the small test map. It's just a door with the trigger volume.
Here you go:
http://www.argentarts.com/uploads/TriggerTest.zip
I hope I've given you everything you need. If I'm missing anything, let me know. It's just a door and your trigger in an empty. Of course, you have the standard MAX behaviors for the door to slide up (which is already attached to the door).
OK the only problem i see is the Volume is below floor level the bas must be seen for collision purposes I will make this better later on
That did it! Works perfectly now. I didn't even pay attention to that. Just dropped it into the scene to test.
If you need help with a model or texture, let me know. That's my area of expertise. :)
lol when i get time to actually build i just might - i do like some of the stuff you have done especially the doom redo :) (im old school i know), in fact im sure ive bought some flags or somthing from tcg store of yours.
Old school is the best!
Nope. Not from me. I've not made anything for the store.
ah no that was avenging angel lol sorry So how is it going is it ok - no biggie problems - ready for me to tidy up the code!
Let me test it some more. Give me about 5 more minutes. I was testing the new demos, doing FPS tests, etc. Just a moment ...
There appears to be the old issue on both automatic modes of it opening/closing the door way before getting to the actual trigger volume. I'll do a video.
Here you go:
There appear to be two spots that cause the door to just open/close right away ... like there's a trigger that's paper thin.
Change your range limiter for that volume. Until i code the auto range limiter stuff. and make sure you have the Switched on box -OFF
Works like a charm. Setting it to 100 is like magic. All functions (manual, automatic, and automatic entry/exit all work as expected. I love this script. :)
Glad you like it enjoy! Any other bright ideas let me know :)
Oh, that's a dangerous box to open, there! :P
Thank you! I'll definitely look through them. I am code-blind, I suppose. Never really took to it. So, I do art. Any code help I can get, I appreciate. :)
If you need somthing special for your project just email me Ill see what can be done.
Can you send me an email to: contact@argentarts.com That way I can have your email on file. Thanks again. :)
This is no longer needed.
For my test level, I've created custom custom triggers. These are just cubes that I use, attaching the Switch Behaviour, for example, and linking them to a door so the player can trigger a sliding door to open from a bit of a distance. Originally, what I tried to do was place the cube in the center of the door, which is a thick, steel door, and scale it outward so that it's sides would protrude enough into the hallway that the player could encounter it from either side of the hallway and, thus, be able to use the one trigger to activate the door by pressing "E". However, this did not work. It appears that the player needs to encounter the CENTER of the trigger object and not the BOUNDARY or VOLUME. And since the center was in the midst of the door, the player could never get to it and, thus, could never trigger the door to open via my custom trigger volume.
Because of this, I would like to request that we are able to use the volume of an object to trigger an event and not it's center. Therefore, if I set up a cube as a trigger that encompasses an entire room that, for example, allows a player to turn on all lights in that room by pressing "E", then they should be able to be anywhere within the volume of that trigger, press "E", and the lights go on or off.
BTW - the custom triggers use a material with the alpha clipping set to 0 so they are invisible and collision set to "no collision" so the player can walk through them.
Currently, I have two triggers, one on either side of my doors to open them (like using a visible switch on either side), but I would prefer to be able to use one trigger volume that is just placed over the door area. The player enters this from either side and the door opens or can be triggered to be opened. One and done. ;) And this sort of thing opens a lot of game play options since custom volumes can be used for a lot of different things.