 |
ZealousAnonymous Wanderer
Joined: 06 Jan 2006 Posts: 70
|
Posted: Tue Sep 05, 2006 6:36 am
DrawLink? |
Just wondering how you would go about disabling the drawlink for exit X in a map. I can't quite figure out how to either A. Do it in zMapper or B. Do it using a COM Access script.
|
|
|
 |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Tue Sep 05, 2006 2:56 pm |
Should probably go in the ZMapper thread.
Inside ZMapper (manually): Select the link, right click on the link > Properties, on the right below the One Way and Door buttons uncheck "Draw Link".
From ZMud (scriptable): Three parts. Create a variable so that you can use the COM functions. Then set the property. Then save--note you won't see any results until after you save.
Code: |
#VAR TempCom {%map.getroom(ROOM NUMBER).exitdir(NUMBER**)}
#VAR TempCom.DrawLink 0
#CALL @TempCom.Save
|
**0 for north, 1 for northeast, and so on clockwise. Up is 8, down is 9, other is 10. Note the error if you use an invalid exit number.
Note that you can do step one any number of ways, depending on how flexible you need it to be, e.g.:
#VAR TempCom {%map.curroom.exitdir(EXIT NUMBER)} |
|
|
 |
ZealousAnonymous Wanderer
Joined: 06 Jan 2006 Posts: 70
|
Posted: Tue Sep 05, 2006 7:34 pm |
Thanks bunches!
|
|
|
 |
ZealousAnonymous Wanderer
Joined: 06 Jan 2006 Posts: 70
|
Posted: Wed Sep 06, 2006 12:15 am |
Still having a few problems? What happens with multiple 'other' exits? I have things like 'in' and 'enter grate' how would I disable the 'draw link' for the second other exit? I keep getting errors in my tests.
|
|
|
 |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Wed Sep 06, 2006 4:08 am |
Theoretically,
Code: |
#var tempcom {%map.curroom.Exit(in)}
#VAR TempCom.DrawLink 0
#call @TempCom.Save |
However, this wasn't working for me (or rather, it was working, just changing the wrong exits in what seemed like a random fashion). I'm sure it's something I'm missing but I'm not sure what, let me know if you figure it out! |
|
|
 |
ZealousAnonymous Wanderer
Joined: 06 Jan 2006 Posts: 70
|
Posted: Wed Sep 06, 2006 4:25 am |
Aye, I had similar results. I'll see what I can do.
|
|
|
 |
ZealousAnonymous Wanderer
Joined: 06 Jan 2006 Posts: 70
|
Posted: Wed Sep 06, 2006 4:58 am |
Aha! I did some research, looked at some other scripts and come up with this which works:
#VARIABLE query {Update ExitTbl set Flags='3' where name = 'EXIT NAME'}
#VAR ConnStr {Provider=Microsoft.Jet.OLEDB.4.0%char( 59)Data Source=C:\fullachaeanmap.mdb}
#VARIABLE conn %comcreate( "ADODB.connection")
#CALL @conn.Open(@ConnStr)
#CALL @conn.execute(@query)
#CALL @conn.close
#VARIABLE rs ""
#UNVAR rs
#UNVAR query
#UNVAR ConnStr
#SAY All done |
|
|
 |
|
|