 |
Meld Newbie
Joined: 28 Jul 2004 Posts: 4
|
Posted: Wed Jul 28, 2004 9:33 am
Question on... variables? |
I'm pretty new to scripting in general, first of all.
I'll try to explain the best I can. When I get webbed or transfixed, I have to writhe and it takes a set amount of time to writhe free. There are a number of things I can't do while I'm webbed or tranfixed. If certain triggers do go off, I start writhing all over again. However, there are other things I can do, and have to do to stay alive, while webbed or transfixed, which is why I can't cut triggers off completely.
What I want to know if there is a way for zMUD to detect that I've already started writhing, and not start over when it does?
Thanks in advance.
Edit: Figure I'll throw a question about the mapper in here too. I set it to map (not follow) and I go move around, and it makes the rooms. Nice. How do I make it so they don't have the overlapping layers, if I move into one room more than once? |
|
|
 |
geniusclown Magician

Joined: 23 Apr 2003 Posts: 358 Location: USA
|
Posted: Wed Jul 28, 2004 1:45 pm |
What causes you to start writhing all over? Just about any command? Or if you use a command, it fires the trigger that sends the "writhe" command, which starts you all over?
If the former, we'd need more information.
If the latter, you could set up a multistate trigger (contrived logical commands, since you didn't provide any MUD output):
Quote: |
#TRIGGER {You are webbed!} {writhe}
#COND {You writhe yourself free!} |
What this does is, when you get webbed, you start writhing, and the trigger goes to the first condition (the original trigger is STATE 0), so the original trigger won't fire until you're free.
As for the mapper question, when I encounter that problem it's usually because the room's description changed. If your MUD has different room descriptions for, say night and day, then be sure to have the "Room Description Changes" option turned on in the mapper configuration. Also, if you do get two rooms stacked on your map, but they're really the same room, then select both, and then "Merge" the rooms... I think it's Ctrl-G, but it's definately in one of the menus (sorry - on my Mac right now, so I can't check it) |
|
_________________ .geniusclown |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jul 28, 2004 5:26 pm |
A general method for preventing an action from repeating, especially when there is more than one trigger which might cause the action, is to use a variable to keep track of whether you are already doing it.
#VAR writhing 0 0
#TR {You are webbed} {#IF !(@writhing) {#VAR writhing 1;writhe}}
#TR {You writhe yourself free} {#VAR writhing 0}
EDIT: corrected typos |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Last edited by LightBulb on Wed Jul 28, 2004 11:25 pm; edited 1 time in total |
|
|
 |
Meld Newbie
Joined: 28 Jul 2004 Posts: 4
|
Posted: Wed Jul 28, 2004 7:22 pm |
Lightbulb, I do that for each condition that causes me to writhe, right?
Also, apparently something is wrong with {#IF, because I get this:
Quote: |
{#IF
^ syntax error |
Edit: Although apparently it works.
Quote: |
Elyse hurls a tarot card with the image of the Hanged Man on it at you. As it reaches you,
writhe
{#IF
a huge mass of rope bursts out of it, entrapping and hindering you.
{#IF |
That's what happened, and...
Quote: |
You have recovered balance on all limbs.
stand
2520h, 2370m exd-
You are too tangled up to do that.
{#IF |
...before, when I tried to stand and was webbed it would start over again, triggering off the 'You are too tangled up to do that' message.
It doesn't recognize the '{#IF' though. |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jul 28, 2004 11:27 pm |
Yes, you do that with each trigger that causes you to writhe. The syntax error was caused by me leaving out a ) at the end. It's fixed now.
|
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
 |
|
|
|
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
|
|