|
Zafrusteria Wanderer
Joined: 11 Oct 2000 Posts: 94 Location: United Kingdom
|
Posted: Mon Mar 11, 2002 9:48 am
multi-state button, example required |
What I'm after is an example of the command line to create a multistate button.
I.e.
#bu buttonid ......
I have read the help, not much info there. I have done a search for multistate, there are a couple of questions but no examples.
I want to have a buttion that sets a variable "bu_state" to be 0-3 for with the text changing to the following wield, dual, get, put.
PS I can crash zmud with one of my attempts anyone interested?
Zaf
When is Zugg going to fix somer of the existing bugs?
Zaf |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Mon Mar 11, 2002 4:27 pm |
Use something like:
#VAR MultiState 0
#BUTTON [%numbuttons()+1] {MultiStateCaption} {} {WieldState|DualState|GetState|PutState} {WieldStateScriptHere|DualScriptHere|GetScriptHere|PutScriptHere} {@MultiState} {} {} {} {} {} {} {} {} {} {0|0|0|0} {} {} "" {} {} {MultistateIDHere}
I have the variable MultiState set to 0 so no scripts trigger when you load the button.
To force the state of the button change that controling variable.
#VAR MultiState 1
Toggles it to the wield state.
Easiest way to load buttons like this is to make an example and export the text.
Note the syntax editor rarely likes the syntax of buttons in aliases.. which you can
ignore.
TonDiening
Beta Upgrading to 6.26 |
|
|
|
Zafrusteria Wanderer
Joined: 11 Oct 2000 Posts: 94 Location: United Kingdom
|
Posted: Wed Mar 13, 2002 6:54 pm |
Thanks for the example, so thats how it works :-)
Zaf |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Mar 14, 2002 1:21 am |
One item of note I found in testing. The section {0|0|0|0} in Ton's example must match the number of states you have. Hence 4 0's for the 4 states, {0|0|0} for 3 states, and {0|0|0|0|0} for 5 states. Don't ask me what the 0's are for, I couldn't count that many parameters along and match it to the help file.
|
|
|
|
|
|