|
tonygks Newbie
Joined: 02 May 2009 Posts: 9
|
Posted: Tue Jun 23, 2009 5:30 am
Mapper question. |
How i can get state of mapper mode (map follow off)? Need to do check for map editing in scripts and dont know how to get it (...
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Tue Jun 23, 2009 2:50 pm |
This should do what you're looking for: %maplocked
|
|
_________________ Asati di tempari! |
|
|
|
tonygks Newbie
Joined: 02 May 2009 Posts: 9
|
Posted: Wed Jun 24, 2009 4:20 pm |
no i need to check map edit state and turn on edit or turn off it.
f.e. i need to change room color but if i change it in manual mode then all ok, but script cant do that if automapper in follow mode. %roomcolor(,green) dont work and need turn on map edit and only then %roomcolor will be work.
so i uses menu {automapper|map}, but when i creating zone and want to color room in this zone with script(map edit on; %roomcolor; map edit off) it turn off mapper and i cant continue edit zone. i find solution how to fix it - change mapper state with macro and edit @map_edit variable and then do check in roomcolor script but some times i change mapper state manual use mouse and roomcolor script works wrong
i use more that one script for editing rooms and zones so want to know how get mapper state using cmud commands (... |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Jun 24, 2009 9:20 pm |
There's no way to tell. The public-version cmud mapper is the same thing as what's in ZMud, just without the automapper class functionality. Even in ZMud there was no direct way to poll the mapper for its mode status, so you had to use %maplocked() to determine if the mapper was open or not and then check the enabled/disabled status of the Automapper (active only when in explore mode) and AutomapperAll (active only in follow/explore mode) to get down to Off/Follow/Explore state.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
wrym Magician
Joined: 06 Jul 2007 Posts: 349 Location: The big palace, My own lil world
|
Posted: Wed Jun 24, 2009 10:44 pm |
From the help file for %maplocked
Quote: |
Sets or returns the maplocked state. When locked changes can not be made to the map. This state is automattically changed when switching to and from MapMode |
%maplocked enables/disables map editing, i use it in a number of scripts, as examples...
Code: |
<alias name="mdoor" id="199">
<value>#IF (%maplocked) {
#CALL %maplocked(0)
#DOOR %1
#CALL %maplocked(1)
} {
#DOOR %1
}</value>
</alias>
|
or
Code: |
<alias name="rname" id="307">
<value>$locked = %maplocked
#if %maplocked() {#call %maplocked(0)}
#CALL %roomid(,%1)
#if $locked {#call %maplocked(1)}</value>
</alias>
|
Both work perfectly for me. |
|
_________________ "To the engineer, all matter in the universe can be placed into one of two categories: (1) things that need to be fixed, and (2) things that will need to be fixed after you've had a few minutes to play with them" - Scott Adams, The Dilbert Principle |
|
|
|
tonygks Newbie
Joined: 02 May 2009 Posts: 9
|
Posted: Thu Jun 25, 2009 7:12 am |
oh thank ill try it
|
|
|
|
|
|