Page 1 of 1

Way to Disable a Subworld Region [Solved]

PostPosted: Thu Apr 28, 2011 11:08 am
by TheMagician
Is there a way to disable a region object (for example when clicking a button)?

I found the options "Enable/Disable Detector" in the responder component rollout and you can select region components there. However the setting (enabled/disabled) doesn't seem to have any effect. The region is always "active".

Any ideas?

EDIT: I try to disable a SUBWORLD region. Sorry for being unclear about that.

EDIT: ANSWER TO THE QUESTION: No, you cannot enable/disable a "subworld region". Instead you have to use "exclude regions" to block the player when you do not want them to enter a subworld. Look at THIS THREAD for a very detailed tutorial on "exclude regions" and how to set them up by Andylegate.

Re: Way to Disable a Region

PostPosted: Thu Apr 28, 2011 12:46 pm
by dendwaler
I really don't know.
But i think it would be good if that excist.
it gives more freedom in age developement.
I am not specificely thinking about triggering by hitting a button, but for example triggering by entering another region.
In that way i think objects can appear more fluently, instead of "popping up" when you enter a new region.
You can be 1 region ahead of that in this way.
Anticipating on the route that will be taken.
I hope i expressed this well enough to follow my thoughts.

Re: Way to Disable a Region

PostPosted: Thu Apr 28, 2011 1:28 pm
by Christopher
Yes, there is a way.
First you need a responder. In this responder you select Add->Enable/Disable->Detector. Under "Command Parameters" is a box saying "(none)". If you click on this, a new window opens, where you select your Region-Detector. If you want to disable a regionsensor, the checkbox (under "Command Parameters"!!!) saying "Enabled" must be unchecked. If you want to enable a region the checkbox must be checked.

I hope this helps you.

Re: Way to Disable a Region

PostPosted: Thu Apr 28, 2011 3:00 pm
by TheMagician
In that way i think objects can appear more fluently, instead of "popping up" when you enter a new region

I'm not sure how that is connected to enabeling/disabeling regions.

In this responder you select Add->Enable/Disable->Detector

Yes that's the method that I referred to in my first post and it works on "normal" region sensors. I have to specify my issue: I try to enable/disable a subworld region (used for entering/exiting subworlds) so that you can only board the vehicle when it's really at the station. Otherwise you fall through the ground as soon as you come near the region object.

The subworld region component doesn't show up in the "enable/disable -> detector" list. That makes sense because it's not classified as a region but as a physics object. However, if I try "enable/disable -> physics object" it has no effect on the subworld region either.

Re: Way to Disable a Region

PostPosted: Thu Apr 28, 2011 3:52 pm
by Branan
TheMagician wrote:Yes that's the method that I referred to in my first post and it works on "normal" region sensors. I have to specify my issue: I try to enable/disable a subworld region (used for entering/exiting subworlds) so that you can only board the vehicle when it's really at the station. Otherwise you fall through the ground as soon as you come near the region object.


Check out Er'cana. It has to handle this for the harvester there.

Re: Way to Disable a Subworld Region

PostPosted: Thu Apr 28, 2011 4:30 pm
by TheMagician
What do you mean by "Check out Er'cana"? Is there a way to export the age to Max and see how everything is set up with components and such?

Re: Way to Disable a Subworld Region

PostPosted: Thu Apr 28, 2011 5:15 pm
by Branan
You can use a tool like PRPShop to examine the various objects in the age and see how everything is hooked together. It takes a bit of understanding of how Plasma works under the hood, but that sort of understanding is good to have in the long run - it will give you a better idea of how to do things moving forward, and what the game actually does with the various component you put into max.

Re: Way to Disable a Subworld Region

PostPosted: Fri Apr 29, 2011 2:53 am
by Christopher
Have you tried to move the Subworldregion with the vehicle? I think this could work, but I#m not sure. In max I doesn't found anything for disable a subworldregion.

Re: Way to Disable a Subworld Region

PostPosted: Fri Apr 29, 2011 3:35 am
by andylegate
The Exit region for subworlds must be parented to your subworld point in order for the physics of it to have any meaning to the avatar while in subworld.

The problem with that is it will move with your subworld point. To keep that from happening, use the Filter Inherit component, and you can restrict it's movement (either on just one axis, or all 3 if you desire.).

This works great for all sorts of things like elevators and rides. I talk about this in my tutorial:


http://dusty.homeunix.net/wiki/Making_S ... d_Rides%29

You can use a responder to turn off and on subworlds, but I do not recommend you do it that way, as it's only good for solo play. If you use it, and your age is going to be in a multiplayer environment, it will cause all the other players in the age to fall through the floor that are not inside the subworld region.

You can also control subworlds with Python, if you open up and take a look at the python file for Teledahn's 3 floor elevator.

To keep people from falling through as you mentioned, you can use a "blocker" like a invisible collider who's physics you can turn off and on, depending on the state of your "ride". Set up a SDL varible that indicates where the ride is (you can either use a BOOL toggle for this so the states are 0 or 1, your you can use a SDL BYTE line and actually set the floor / station, etc that the ride is at. Then attach a python component somewhere and you can use xAgeSDLBoolResponder python file (if it's Bool, you have to use INT version if it's BYTE), and tell Plasma to either enable or disable your "blocker" based upon where your Ride is, have it "Disabled" when the ride is there, and "Enabled" when it's not.).

Of course some people do not like the idea of invisible blockers (like in Teledahn, when the elevator is not there, you just see this gap there, but you can't walk through it). In that case you could put in a animated door / gate / whatever that is rendered and will block the player (you have it animate based upon the "state" of the ride just as I mentioned above).

Again, there are several ways to do this and they work great.

Re: Way to Disable a Subworld Region [Solved]

PostPosted: Sat Apr 30, 2011 9:34 am
by TheMagician
Thanks for all your input guys!
I've updated the first post with an answer to the main question.