Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My mod I'm currently working on.
Hypercube Offline
Member

Posts: 124
Threads: 20
Joined: Sep 2015
Reputation: 1
#6
RE: My mod I'm currently working on.

(03-13-2016, 07:33 AM)Abion47 Wrote: In that case, here are some things you should take into consideration.

An area that collides with everything will collide with everything. This means parts of the walls, the floor, some incidental bits of furniture that happen to be around, and even the door itself. All of these things will trigger a collision, and your collision function will have to take that into account. The collision triggers will also fire when something is already inside the area when the map is first loaded, so all the things I talked about above will become concerns when the player enters the level for the first time and suddenly all the doors are opening.

Also, the collision function will only be called when one of two things happen - when something enters the area, and when something leaves the area; movement inside the area is not recorded. So if something enters the area, moves away from the door but doesn't quite leave it, then walks toward the door again, the collision will only be registered once. Also, the collision doesn't discriminate between what exactly is entering or leaving, so if the player enters the area, but almost immediately after something else like, say, a tin can gets knocked out of the area, the area will trigger an "exit" collision from the can, even though the player is still trying to get through the door.

So if you want the door to act like it's connected to a motion detector, you are going to need more than just trigger areas. You're going to need to keep track of every single object that enters the area, when they leave, and whether or not they are moving while inside the area. You're going to need to have some kind of system that keeps track of when multiple objects are coming and going (even at the same time) and react accordingly. And you're going to need to do this all for every single door in your level that you want to open and close automatically.

So yeah, my recommendation is to just go with the two-overlapping-area approach instead.
Yeah it would be kind of crazy to actually have it react to everything that would open the door. Umm, yeah... I would go with two overlapping areas to do this instead. It would just be easier to only use one area that could be a motion tracker sort of thing.
(This post was last modified: 06-22-2016, 02:17 AM by Hypercube.)
03-13-2016, 08:51 PM
Find


Messages In This Thread
My mod I'm currently working on. - by Hypercube - 03-11-2016, 11:40 PM
RE: My mod I'm currently working on. - by WALP - 03-12-2016, 02:00 AM
RE: My mod I'm currently working on. - by Abion47 - 03-12-2016, 02:59 AM
RE: My mod I'm currently working on. - by Abion47 - 03-13-2016, 07:33 AM
RE: My mod I'm currently working on. - by Hypercube - 03-13-2016, 08:51 PM



Users browsing this thread: 1 Guest(s)