|
yvu Newbie
Joined: 05 Jan 2009 Posts: 7
|
Posted: Mon Jan 05, 2009 9:23 pm
Detect state of doors? |
Hi!
Would it be possible to tell mapper when to try to open doors, and when not to? Or else every time I walk through a door and back, CMUD sends "open" command, regardless of whether it's needed.
Thanks. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jan 05, 2009 9:42 pm |
Does it matter if it sends one that's not needed, though? Generally, trying to open something that's shut just gives an error and the map can keep on going.
|
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Mon Jan 05, 2009 10:12 pm |
Well, it's spammy, especially if most doors are usually open. I believe you can do this using ZMapper, if you're willing to deal with all of the other bugs.
|
|
|
|
yvu Newbie
Joined: 05 Jan 2009 Posts: 7
|
Posted: Mon Jan 05, 2009 10:46 pm |
gamma_ray wrote: |
Well, it's spammy, especially if most doors are usually open. I believe you can do this using ZMapper, if you're willing to deal with all of the other bugs. |
Would it be possible solely with cmud? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Jan 05, 2009 11:24 pm |
Yes. The way to do it is to first set up a trigger that detects the state of the doors. If the mud isn't telling whether they are opened or closed then there is nothing you can do. Once your are properly recording the open/closed state into a variable you can then set up an alias that takes parameters of direction and doorName. It should send the appropiate command based on the contents of the variable. Finally adjust the Strings and Doors section of your mapper configuration, by replacing the "open" with the name of your alias.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|