|
mutujacysnotling Newbie
Joined: 30 Aug 2017 Posts: 1
|
Posted: Wed Aug 30, 2017 3:27 am
Mapper, #makeroom command in direction where another room already exists |
Hi there!
I have a problem that i can't resolve.
I'm creating dynamic map for maze in MUD that i play (every time when you enter the maze there is new layout for locations).
Every location (there is something like 20 locations) got their unique description, so i'm using #trigger with desc pattern for making map.
On the entrance i'm setting in my database variable called @mazelocations value for keys equal 0
and for the locations triggers i got something like this (for eg.):
content for LOCATIONS TRIGGERS:
#sh {}
#sh {%ansi(15) >> %ansi(yellow)LOC01}
#sh {}
#if (%db(mazelocations,loc01)=0) {makemazedir;#addkey mazelocations {loc01=%roomvnum}} {#var mazelastroom {%roomvnum};#te {%db(mazelocations,loc01)};makemazelink}
content for MAKEMAZEDIR alias (making rooms in chosen direction):
#call %maplocked(0)
#MAKE @step
#MO @step
#call %maplocked(1)
content for MAKEMAZELINK alias (making links for existing mapper locations)
#call %maplocked(0)
#call {%roomlink(@mazelastroom,@step,%roomvnum)}
#call %maplocked(1)
where @step variable is direction that i'm going
and it's working very well... but sometimes the layout for locations is so annoying that i need to create room in direction where different room already exists
so my question is: what can i do with that without using a mouse, just with using commands like above?
i was thinking that maybe there is some possibility for checking if another room exists in that specific direction (don't know the command), and if its true create room above existing (without overlaying each other!), or with different link lenght, or with bended link, or ... something else?
Pls help, i'm loosing too much hair from my head for that :) |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Aug 30, 2017 6:29 pm |
Unfortunately, the mapper automatically makes thing adjacent.
If you are dealing with overlapping rooms from a poorly coded layout or random generation, the mouse is simply required to make things look neat on the screen.
However, there is a way to tell if a given direction already has a room attached to it:
#SAY %roomlink(,w)
It returns the %roomnum. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|
|
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
|
|