|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Wed Dec 18, 2013 1:38 pm
Floating variable |
I believe i need a different type of variable to capture and translate this capture to show a number value... If someone knows a way to do that could you please show me an example?
^Hp~: ~|----------*~| Gp~: ~|*----------~| Gxp~: ~|----*----------------~| P~:(%w)$
need 3 different variables to mark the position of the asterisk, so the capture can be changed from "---*-----" to 0-100%
thanks in advance, and much appreciated!!! |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Wed Dec 18, 2013 4:15 pm |
You'll want to work with %pos then. You could construct a trigger like such:
Code: |
#TRIGGER {^Hp~: ~|(*)~| Gp~: ~|(*)~| Gxp~: ~|(*)~| P~:(%w)$} {$HpPos = %pos("*", %1);$GpPos = %pos("*", %2); $GxpPos = %pos("*", %3)} |
The value returned for each %pos will be where the * is at on the line graph. For instance:
will return a value of 5 for the *.
Then you can do what you need to do with the variables. |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Thu Dec 19, 2013 9:43 pm |
cool beans! thanks:)
|
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Thu Dec 19, 2013 9:48 pm |
hrrrm , seems to allow a fatal looping when i tried it on my client. is there a way to no capture it that way, because there are several things in the mud that use Hp: or Sp: and the like... so i think it's seeing any of those, and looping.
also if i wanted to set the variables to HpPos to say 1-10 = 0-100% how would i do that heh... |
|
|
|
chris123zugg Apprentice
Joined: 23 Aug 2013 Posts: 175
|
Posted: Thu Dec 19, 2013 11:36 pm |
hrrrm , seems to allow a fatal looping when i tried it on my client. is there a way to no capture it that way, because there are several things in the mud that use Hp: or Sp: and the like... so i think it's seeing any of those, and looping.
also if i wanted to set the variables to HpPos to say 1-10 = 0-100% how would i do that heh... |
|
|
|
|
|