Page 1 of 2

How to Disable a Collider Object [Solved]

PostPosted: Fri Apr 29, 2011 12:54 pm
by TheMagician
Sorry for another new post. But I really don't get this.

I've created a box object and assigned a physics component to it (terrain with hull collision). I also attached a NoShow component to hide the object.
Now I want to create a responder which can disable this collider in order for me to pass through.

I thought that "Enable/Disable -> Physical" is used to achieve this effect. But it turns out that "physical" refers to dynamic moveable objects which are activated/deactivated by this command.
I have not yet found a way to enable/disable a collider object. The component "ex InvisibleBlocker" doesn't do anything for me. I can walk right through it.

Any help is appreciated.

EDIT: ANSWER TO THE QUESTION: You cannot enable/disable the collision of an object that has a "terrain" or "proxy terrain" component attached. Instead you have to use "exclude regions" to block the player when you do not want them to enter a certain area. Read through this thread for a very detailed tutorial on "exclude regions" and how to set them up by Andylegate.

Re: How to Disable a Collider Object

PostPosted: Fri Apr 29, 2011 1:05 pm
by N. Sigismund
Have you looked into exclude regions? I know that's sort of vague - and getting an exclude region to work like that may need either some creative use of Cyan's python or your own - but certainly for xStandardDoor.py they're used to prevent people getting into a certain area under certain conditions, and at all other times are off.

It would also be kind of... inventive, I probably should say, :lol: but you could always animate the invisible collider so that it moves out of the way instantly once it's required to.

Re: How to Disable a Collider Object

PostPosted: Fri Apr 29, 2011 1:14 pm
by TheMagician
I've clicked around with exlude regions a bit but I don't get how they work (and don't have the nerve right now to figure it out ;) ).

In the worst case I really have to animate the boxes but that's really not very elegant.

In another post Andylegate sounded like he had some experience with enabling/disabling collider boxes. Perhaps he can enlighten us.

Re: How to Disable a Collider Object

PostPosted: Fri Apr 29, 2011 2:07 pm
by andylegate
If you put a NoShow component on it, you need to make sure that you have checkmarks where it says Drawables and Physicals. And you need to put a check up where it says: "Disable only because I may want to enable it later, etc, etc, etc"

Personally, I never use Terrain component for invisible colliders anymore. I use ProxyTerrain, because it automatically make the collider not visible.

You can make a visible object (bars, door, etc) and give it a Terrain component, then animate it, so that it's out of the way when the player can go, and in the way when the player shouldn't go.

Exclusion Regions: Exclusion Regions are a multiplayer component polishing (Cyan's words, not mine). They are used to move players out of the way so that a door doesn't crush them, so your elevator doesn't squash them, etc, etc, etc.

To make a Exclusion Region, you can make the region itself, the same size as the object you don't want to crunch the player. You also will need to use a Dummy, and put it where you want the player to go if the Door/Elevator/whatever starts to move. This is called the Safety Point.
Put a Multi Beh Mod on this dummy. Use the Idle avatar animation (that's the name of it, "Idle") and check mark "Use Smart Seek"

Go back to your Exclude Region, and put a Exclude Region component on it (if you have not done so already). In the roll out box, where it says Safety Points, click on the Add button. A new window will apear, listing all your One Shots and Multi Beh Mods. Pick the one that you made as your Safety Point.
If you need the avatar to be blocked right off the bat (when they first link in), you need to put a check mark where it says "initially cleared"

"Clear" or "Cleared" means to clear the avatar out of the way (and it will block the player too).
"Release" or "Released" means to let the avatar through, don't move the avatar, etc, etc.

I know, I know. Nomenclature with Cyan sucks sometimes :rolls eyes:

Now you'll need to include this Exclusion Region in your responder (or Python file if you are using a custom made python file that is controlling things). You'll see that in the responder you'll have "Clear" and "Release" when you put your cursor on Exclusion REgion.
Just remember: Clear is to CLEAR AWAY AND BLOCK. Release is to RELEASE THE AVATAR AND LET THEM THROUGH.

Whew. Okay, hope this helped.

Re: How to Disable a Collider Object

PostPosted: Fri Apr 29, 2011 2:24 pm
by andylegate
Almost forgot:

On your safety point, in your Multi Beh Mod roll out, make sure you put a check mark where I have circled, else it will not work correctly:

Image

Re: How to Disable a Collider Object

PostPosted: Fri Apr 29, 2011 2:26 pm
by GPNMilano
andylegate wrote:If you put a NoShow component on it, you need to make sure that you have checkmarks where it says Drawables and Physicals. And you need to put a check up where it says: "Disable only because I may want to enable it later, etc, etc, etc"

Personally, I never use Terrain component for invisible colliders anymore. I use ProxyTerrain, because it automatically make the collider not visible.

You can make a visible object (bars, door, etc) and give it a Terrain component, then animate it, so that it's out of the way when the player can go, and in the way when the player shouldn't go.

Exclusion Regions: Exclusion Regions are a multiplayer component polishing (Cyan's words, not mine). They are used to move players out of the way so that a door doesn't crush them, so your elevator doesn't squash them, etc, etc, etc.

To make a Exclusion Region, you can make the region itself, the same size as the object you don't want to crunch the player. You also will need to use a Dummy, and put it where you want the player to go if the Door/Elevator/whatever starts to move. This is called the Safety Point.

Go back to your Exclude Region, and put a Exclude Region component on it (if you have not done so already). In the roll out box, where it says Safety Points, click on the Add button. In the scene pick the dummy that you created for your Safety Point.
If you need the avatar to be blocked right off the bat (when they first link in), you need to put a check mark where it says "initially cleared"

"Clear" or "Cleared" means to clear the avatar out of the way (and it will block the player too).
"Release" or "Released" means to let the avatar through, don't move the avatar, etc, etc.

I know, I know. Nomenclature with Cyan sucks sometimes :rolls eyes:

Now you'll need to include this Exclusion Region in your responder (or Python file if you are using a custom made python file that is controlling things). You'll see that in the responder you'll have "Clear" and "Release" when you put your cursor on Exclusion REgion.
Just remember: Clear is to CLEAR AWAY AND BLOCK. Release is to RELEASE THE AVATAR AND LET THEM THROUGH.

Whew. Okay, hope this helped.


There FIXED. You do not need to attach anything to this dummy other then the page info node, and select the actual object in the exclude region's rollout box.

Andy, I suggest you take a look at some of the attachments to the scene objects in the prps. This will help so that you don't attach unnecessary things to objects and make more work for yourself than is actually needed.

Re: How to Disable a Collider Object

PostPosted: Fri Apr 29, 2011 3:02 pm
by N. Sigismund
You know, I do wonder exactly what it is with this site and constantly having Andy's posts followed up by immediate "actually, this is right" responses. Although it is helpful to get completely correct information, so corrections are appreciated.

Cheers for the info Andy - I'm trying to get exclude regions to work on my end as part of xStandardDoor and it's not been working, which is why the release of Llantern I'm putting out tonight has a non-functional door. :lol: Is there any chance of a complete tutorial on xStandardDoor, now that we're in a situation where we need to really think about basic multiplayer stuff?

Re: How to Disable a Collider Object

PostPosted: Fri Apr 29, 2011 3:37 pm
by andylegate
No, no, it's all right. Chole's not saying I'm wrong, however she is right. You don't have to use a One Shot or a Multi Beh Mod on your dummy safety point if you don't want to.

But neither am I wrong about it.

I give you, Bevin, classroom door. The safety point is also the one shot for avatar animation for touching the door:

Code: Select all
plExcludeRegionModifier>
   <plKey Name="cXrgnClassRmDoor" Type="plExcludeRegionModifier" Location="3;3" LocFlag="0x0000" ObjID="1" />
   <SynchParams flags="0x00000000">
      <ExcludePersistentStates></ExcludePersistentStates>
      <VolatileStates></VolatileStates>
   </SynchParams>
   <ModFlags>
      <hsBitVector></hsBitVector>
   </ModFlags>
   <ExcludeRegionParams Seek="False" SeekTime="10" />
   <SafePoints>
      <plKey Name="behPvtRmDoorLeftExt" Type="plSceneObject" Location="3;3" LocFlag="0x0000" ObjID="64" />
   </SafePoints>
</plExcludeRegionModifier>


and here is the plKey attached to it, it's a One Shot:

Code: Select all
      <plKey NULL="True" />
   </AudioInterface>
   <Interfaces>
   </Interfaces>
   <Modifiers>
      <plKey Name="cBehDoorBtnTouch_2" Type="plOneShotMod" Location="3;3" LocFlag="0x0000" ObjID="8" />
   </Modifiers>
   <SceneNode>
      <plKey Name="Neighborhood_nb01" Type="plSceneNode" Location="3;3" LocFlag="0x0000" ObjID="1" />
   </SceneNode>
</plSceneObject>



Chole is just saying : "Don't put extra stuff on something you don't have to." and she's correct.

The reason I like to use Multi Beh Mod's on these guys, so so I can use the DOH! animation after the player has just tried to get themselves cut in two by a door.

It's all about how you want to do it, and either my way, or Chole's way will work.

What problem are you having with xStandardDoor.py Nye?

Re: How to Disable a Collider Object

PostPosted: Sat Apr 30, 2011 1:38 am
by TheMagician
Thanks for the explanation about exclude regions. This could be a wiki tutorial *hint* ;)
However, I understand that they are only needed as an addition to invisible colliders.

Now back to my main problem. Andy, you write:
You can make a visible object (bars, door, etc) and give it a Terrain component, then animate it, so that it's out of the way when the player can go, and in the way when the player shouldn't go.


As soon as I animate the object all physical attributes seem to be lost. I can walk right through it wherever it is. This is so frustrating :evil: but I'm sure everybody who has worked with Plasma knows that feeling ;)

Re: How to Disable a Collider Object

PostPosted: Sat Apr 30, 2011 2:05 am
by wodan944
Hi, maybe you should give it a ProxyTerrain, that helped me by making animated objects.

Wodan944