|
Maximus Wanderer
Joined: 21 May 2001 Posts: 59 Location: USA
|
Posted: Mon Feb 18, 2002 5:42 pm
"Persistant" commands |
In a mud I play, there are numerous "defences" a character may have active. These defenses can usually be toggled on and off or even stripped by opponents. In the heat of battle, one tends to let stripped defenses slide by unnoticed. So, I had the idea to make "persistant" defenses.
The idea is that you have a variable to keep track of whether the defense is on or off. Then, you have a toggle button to toggle persistance (because you may not always want a defense to be persistant). If the defense has been toggled to be persistant, then whenever the defense's variable shows that it is NOT on, the persistant system would make sure it got turned back on.
For example, let's say I have a defense that reduces some type of damage. I have turned the persistance on. Someone removes that defense. zMud should recognize this and continue to try to raise the defense again until successful. It would be easy enough to just have it trigger once, but we all know that, for whatever reason, the command may not go through. So, the persistant system needs to keep trying until it gets what it wants. Ideally, I should be able to turn persistance on and, whether the defense is up or not, it should be raised due to persistance being turned on (this cannot be done with Expression triggers as far as I know - they only trigger when the variable changes from something else to the desired value).
Basically, what I envision is an alarm that is turned on when the defense goes down. The alarm tries to raise the defense and, when succesful, is disabled. The problem is that alarms are burdenous and I would ideally have in the upwards of 50 persistant systems going at a time...which would probably bog zMud into oblivion.
So, if anyone can think of a better method, please let me know. IF you have any questions, don't hesitate to ask.
-Maximus |
|
|
|
Maximus Wanderer
Joined: 21 May 2001 Posts: 59 Location: USA
|
Posted: Mon Feb 18, 2002 5:59 pm |
*thwap me*
Okay, I just realized that the Expression triggers do execute all the time. I was testing Offline, so...meh. That, and I never knew While loops could act independently of triggers, aliases, etc...
So, I may have a workaround for the alarms. Don't hesistate to give me any suggestions, though!
-Maximus |
|
|
|
|
|
|
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
|
|