|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Wed May 04, 2005 8:28 pm
A trigger that changes a button text? |
Well here's the deal.
I wanted to make a row of buttons/indicators in my zmud showing the buff spells i know. Basicly when i cast it succesfully it should turn green and when it wears off it should turn red. I've got all the commands needed to trigger theese 2 states i just don't really know how to do it. I tried setting up toggle buttons where the text is green in one cast and red in the other. But toggle buttons just excecuted the command when i pressed it instead of changed when the mud echoed to me.
Any ideas? |
|
|
|
Maelstrom Apprentice
Joined: 10 Feb 2005 Posts: 158
|
Posted: Wed May 04, 2005 8:41 pm |
Make it a normal button (not toggle) with initial color as red and nothing for the main body (IE when pressed it will do nothing):
#TRIGGER {successful cast} {#NOOP %btncol(1,green,gray)}
#TRIGGER {spell wears off} {#NOOP %btncol(1,red,gray)} |
|
|
|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Wed May 04, 2005 8:52 pm |
i wont need any form of id on the button? I plan to have several of theese indicators.
|
|
|
|
Maelstrom Apprentice
Joined: 10 Feb 2005 Posts: 158
|
Posted: Wed May 04, 2005 8:58 pm |
The first param to %btncol can be either the button number (the way I used it) or the button ID. Take your pick...
|
|
|
|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Wed May 04, 2005 9:28 pm |
so i can replace %btncol with whatever id i set my button to have?
like %btnhaste ? |
|
|
|
fhqwhgad Novice
Joined: 07 Feb 2005 Posts: 38
|
Posted: Wed May 04, 2005 9:42 pm |
ah it's the 1 i can change to id.. got it..
Thanks alot it works like a charm :D |
|
|
|
|
|