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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat Jun 06, 2009 5:18 pm   

[306B] [308B] %maplocked
 
invoking %maplocked(0|1) does change the flag, but has no effect on the state of the map. That is, if one is in map mode when the function is invoked [#CALL %maplocked(1)], one will remain in map mode even though the flag is now 1. The reverse is also true. This can be verified by simply looking at the mapper toolbar.
_________________
Sic itur ad astra.
Reply with quote
wrym
Magician


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

PostPosted: Sun Jun 07, 2009 1:02 am   
 
%maplocked is working for me, I use it in a number of scripts, It's just not updating the the button.

Here is the code I used to test:

Code:
<alias name="maplocktest" id="1131">
  <value>$roomname = %roomid()
$locked = %maplocked
#print
#call %maplocked(0)
#print %maplocked()
#print %roomid()
#call %roomid(,"blahblahblah")
#print %roomid()
#call %maplocked(1)
#print %maplocked()
#print %roomid()
#call %roomid(,"asdfasdf")
#print %roomid()
#print %maplocked()
#call %maplocked(0)
#call %roomid($roomname)
#call %maplocked($locked)</value>
</alias>


Which from a blank room spits out for me:
Code:
0

blahblahblah
1
blahblahblah
blahblahblah
1
_________________
"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
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sun Jun 07, 2009 7:22 am   
 
Try the following:

1: Make sure that the map is not in Map Mode.

2: on the command line type #ECHO %maplocked ( it displays 1)

3: Click the Map Mode button on the map window so that you now can modify the map.

4: on the command line type #ECHO %maplocked ( it displays 0)

5: on the command line type #CALL %maplocked(1)

6: on the command line type #ECHO %maplocked ( it displays 1)

7: Since you can still see the pallette, click on A and add a label to the map.

You will succeed.
_________________
Sic itur ad astra.
Reply with quote
wrym
Magician


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

PostPosted: Sun Jun 07, 2009 8:24 am   
 
Hmm well %maplocked works from within a script, but it appears that there is a disconnection with the map window
_________________
"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
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jun 08, 2009 5:07 pm   
 
Is the map window set to be tracking the Location object that is being used in your script?
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Jun 09, 2009 7:11 am   
 
If you are referring to me, I only have one Location object (and it tracks correctly). The problem is that the value returned from %maplocked does not reflect the actual state of the window. So it does work from script, as far as that goes, but to assume that if the flag is 1 the map won't update, if for instance one made a wrong turn into a wall (causing the mapper to create a new room in that direction), would be an error. The reason I am looking at the flag is because, in the past, my run scripts have made such wrong turns and I have a slew of created rooms that don't belong to the MUD. I was trying to prevent the run scripts from executing if the mapper was in Map Mode (mimicking the flag in the map properties). In that sense the flag will do the job, regardless of whether I can change the map manually or not. What I was expecting to see was the mapper toolbar updating when I changed the flag setting in script. When I saw the it wasn't updating, I tested to see if that was just a visual problem or that the lock wasn't being set (or reset). My post shows the result of the test.

EDIT: I think my point needs clarification: If I click on the mapper toolbar, %maplocked will reflect the state of the toolbar. However, setting (or resetting) %maplocked does not change the state of the toolbar. So if the toolbar was indicating Map Mode, then the map will stay in Map Mode even though the flag is now reset. So the flag is only valid when the state of the mapper is changed manually.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 09, 2009 4:51 pm   
 
Confirmed and added to bug list. Thanks for the clarification.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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