Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
tonygks
Newbie


Joined: 02 May 2009
Posts: 9

PostPosted: 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 (...
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Jun 23, 2009 2:50 pm   
 
This should do what you're looking for: %maplocked
_________________
Asati di tempari!
Reply with quote
tonygks
Newbie


Joined: 02 May 2009
Posts: 9

PostPosted: 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 (...
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
wrym
Magician


Joined: 06 Jul 2007
Posts: 349
Location: The big palace, My own lil world

PostPosted: 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
Reply with quote
tonygks
Newbie


Joined: 02 May 2009
Posts: 9

PostPosted: Thu Jun 25, 2009 7:12 am   
 
oh thank ill try it
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net