How to find the slide direction of door(s)?
I'm working on adding sliding door support to my Breakable Doors plugin, but am coming up with some problems...
basically what I do to the sliding doors is: a) make them PASSABLE b) make them INVISIBLE by doing this players are able to walk through an invisible door, hence giving the illusion that the door has been destroyed. However, when I set the door back to NON-PASSABLE (i of course need to re-dispatch it after this), the door appears just fine, but the door angles get all screwed up.. ie- the direction it needs to slide, is messed up. I've looked in the SDK and the FGD file(s) and have been unable to find out exactly what controls this direction, however, i do know that i've been unable to use get_keyvalue() for anything because it's seemingly broken and doesnt return a thing. I've tried many entvars on the door to see if anything will return some kind of angle or velocity for the openned door, but have been unsuccessful. Anyone else out there (perhaps someone w/ mapping experience) care to help me out? Thanks. |
Hmm. This isn't something thta will be expressedin the .fgd... Its like origin, although its not expressed specifically in the .fgd or sdk for a particular entity, its like a universal config. Just try a series of properties like angles to see which will work. Have you tried "Yaw Pitch Roll"? Lol I have no idea what that does but maybe its what your looking for.
|
EDIT: Erm no, i misunderstood it, and i meant an another native. Forgot what i said :D
|
The "angles" keyvalue will return which direction a func_door moves. To figure out what direction a func_door_rotating moves, you will need to figure out where the origin brush tied to it is located (I'm not sure if this is possible) and whether or not the "Reverse dir" flag is checked. I think it is treated as a vector. The format is "x y z", so it might appear as "0 90 0". Also, have you ever considered storing where the door's origin was, moving it far away, and then moving the origin back when needed?
|
that's how the rotating doors work :)
it doesnt work that way though with the sliding doors, unfortunately. |
The angles keyvalue determines the direction of func_doors, like I said.
Based on front view: -90 0 0 is up 90 0 0 is down Based on top view: 0 180 0 is left 0 0 0 is right 0 90 0 is up 0 270 0 is down |
Quote:
|
| All times are GMT -4. The time now is 17:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.