|
Akkalis Newbie
Joined: 20 Feb 2004 Posts: 1 Location: Canada
|
Posted: Fri Feb 20, 2004 4:34 am
Guage/Script Question |
First time post, I hope this is the proper place to ask for the help. If not someone smack me, or just let me know.
Okay, basically here is what I am looking to do. Setup a gauge that will turn green when I can use a skill, and turn red when I cannot.
The MUD I play on, battleskills have a X amount of delay based on what skill it is. So what I was thinking is, set up a trigger so when the the skill fires, it makes the guage red;executes a wait command and then makes the guage green again.
The trigger stuff is pretty straight forward, what I need to know is how I can go about using it to modify the values of the guage.
I figure it would be something like setting the value = to a variable, and then having the trigger turn the variable on and off, I just have no idea how to DO that.
Would really appricate some help, or redirect to where I might find the answer. I looked for a bit, but I couldn't find it.
Thanks. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Feb 20, 2004 10:31 am |
A gauge is a fairly simple way of doing this. Using the settings editor, create a button, set the Kind to Gauge, and give it an appropriate Caption. Go to the Gauge tab and set the Gauge Color to green and the Gauge Background to red. Set the Value to your variable and the Gauge Max to 1. You can ignore the Gauge Low field and the Low Color for this button.
Create the variable with a default value of 1.
Have your trigger set the Variable to 0, with a delayed action to return the variable to 1. It's recommended that you don't use #WAIT in triggers. Instead, use either #CONDITION (multistate trigger) with a Wait parameter or #ALARM to create the delay. (In the settings editor, you use the State field to create additional states and switch between them. #CONDITION is used to create additional states from the command line.)
Sample script with multistate trigger, for entry into settings editor.
Button:
Button States tab
Kind: Gauge
Caption: Test
Gauge tab
Value: @test1
Gauge Max: 1
Gauge Color: bright green
Gauge Backg: bright red
Variable:
Name: test1
Default: 1
Use Default value: checked
Trigger:
Pattern tab
Pattern: Testing in progress
Value: #VAR test1 {0}
State: New (this creates a second state number 1. The original state is 0)
Value: #VAR test1 {1}
Options tab
Type: Wait
Param: 2000 (this is a 2 second delay) |
|
|
|
|
|
|
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
|
|