|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Mon Jul 14, 2008 11:01 am
Mapping help - editing map object proerties from script |
I have finally decided to begin the process of replacing my mudbot maps with cmud's maps. It seems like a good time to do it, what with my mudbot maps being horribly out of date, and with Zugg about to start the mapper overhaul it might be nice to be using it while he does so I can contribute and perhaps influence things a little
Still, I want to do it properly, since I am mapping everything from scratch. I've done a bit of testing, and the room detection etc seems very good, no doubt part of that due to mxp tagging of the room info.
However, there are a few things I want to get working, if they are possible, before I begin walking everywhere in the game. I don't want to have to do it twice, haha.
* I want to store information of the room type as I map, with the information taken from survey.
* This information may also be used to colour the room created, preferably automatically
* I wish to store other room information as well, such as the presence of shrines (mostly shrines. Things like shops I can do manually as there aren't all that many of them, ultimately.)
I haven't yet read every scrap of info in the help files as thoroughly as possible, but I have put in a decent search. The information may be staring me in the face, and if it is I apologise, but I can find no information about how to tweak the 'map object properties' from script. There is a section explaining how to do it manually, though. I really hope its possible. |
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Jul 14, 2008 12:00 pm |
Room type info example:
Code: |
#event OnRoomCreate {survey}
#trig {You survey the room and discover that its type is (*).} {#switch (%1)
("desert") {#call %roomcol(,"yellow")}
("forest") {#call %roomcol(,"green")}} |
Shrines:
#trig {A shrine of some god is here} {#call %roomcol(,"purple")}
The #switch syntax I'm using there is different to the normal syntax, read the help file carefully. It makes it much easier to add new terrain types later on.
One thing you might want to do is instead of changing the colour as soon as, say, you see a shrine or survey a room, you add this information to a stringlist variable, like:
#additem roomdata shrine
You'll set this variable back to "" with the OnRoomEnter event. The OnRoomEnter even will then trigger a short alarm - say, 1 or 2 seconds - after which it'll look through the RoomData variable and set the colour based on the flags you've set. You just use the #switch command for that like I've done above:
Code: |
#alias CommitRoomDataToMap {#switch (%ismember(@RoomData,"shrine")) {#call %roomcol(,"purple")}
(%ismember(@RoomData,"forest")) {#call %roomcol(,"purple")}} |
|
|
|
|
Caled Sorcerer
Joined: 21 Oct 2000 Posts: 821 Location: Australia
|
Posted: Mon Jul 14, 2008 12:27 pm |
Thanks loads for that, Fang :)
|
|
_________________ Athlon 64 3200+
Win XP Pro x64 |
|
|
|
|
|
|
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
|
|