|
Thalir Novice
Joined: 10 Aug 2002 Posts: 35 Location: USA
|
Posted: Fri Jan 31, 2003 11:27 pm
Please Help with Gauge |
Ok, i have a guage for Hit Points, Fatigue and Carry.
The HP and Carry guage's work just fine.
However the Fatigue gauge doesnt seem to fire on the trigger i have set to check health. which is meant to refesh both bars
I was hoping someone can look at this and tell me what i am doing wrong.
#CLASS {gauges} {disable}
#TRIGGER {%points of damage!} {health}
#TRIGGER {HP: (%d)/256} {#VAR HPS %1}
#TRIGGER {Ftg: (%d)/112} {#var FTGS %1}
#TRIGGER {Your inventory totals (%1) lbs.} {#var carry %1}
#BUTTON 6 {HEALTH @HPS} {@HPS} {} {} {@HPS} {@HPS} {} {Size} {171} {23} {} {} {} {32} {} {Gauge||12|256|150|7} {0} "" {Inset|Top} {} {}
#BUTTON 7 {FATIGUE @FTGS} {@FTGS} {} {} {@FTGS} {@FTGS} {} {Size} {171} {23} {} {} {} {32864} {} {Gauge||12|112|60|7} {0} "" {Inset|Top} {} {}
#BUTTON 8 {Carry @carry} {@carry} {} {} {@carry} {@carry} {} {Size} {120} {24} {} {} {} {32848} {} {Gauge||12|537|260|7} {} "" {Explore|Inset} {} {}
#CLASS 0
Basicly everytime i take damage the trigger should fire off a health command which looks like this.
HP: 221/256 Ftg: 90/112
this is meant to refresh my guages.
it work great for the Health bar but does not work at all for the fatigue bar.
any ideas?
Thanks,
Thalir. |
|
|
|
IceChild Magician
Joined: 11 Oct 2000 Posts: 419 Location: Post Falls, ID, USA
|
Posted: Sat Feb 01, 2003 1:35 am |
I believe, though please feel free to correct me if I'm wrong, but you have to put the HP and Ftg on the same line, in the same trigger.
zMUD, I BELIEVE, only checks for 1 trigger per line.
Though, it would definately be nice to be proven wrong
Icechild
mv -f message.text /dev/null |
|
|
|
IceChild Magician
Joined: 11 Oct 2000 Posts: 419 Location: Post Falls, ID, USA
|
Posted: Sat Feb 01, 2003 1:41 am |
quote:
#CLASS {gauges} {disable}
#TRIGGER {%points of damage!} {health}
#TRIGGER {HP: (%d)/256} {#VAR HPS %1}
#TRIGGER {Ftg: (%d)/112} {#var FTGS %1}
#TRIGGER {Your inventory totals (%1) lbs.} {#var carry %1}
#BUTTON 6 {HEALTH @HPS} {@HPS} {} {} {@HPS} {@HPS} {} {Size} {171} {23} {} {} {} {32} {} {Gauge||12|256|150|7} {0} "" {Inset|Top} {} {}
#BUTTON 7 {FATIGUE @FTGS} {@FTGS} {} {} {@FTGS} {@FTGS} {} {Size} {171} {23} {} {} {} {32864} {} {Gauge||12|112|60|7} {0} "" {Inset|Top} {} {}
#BUTTON 8 {Carry @carry} {@carry} {} {} {@carry} {@carry} {} {Size} {120} {24} {} {} {} {32848} {} {Gauge||12|537|260|7} {} "" {Explore|Inset} {} {}
#CLASS 0
Also, you have some errors:
#TRIGGER {HP: (%d)/256} {#VAR HPS %1}
should be:
#TRIGGER {HP: (%d)~/256} {#VAR HPS %1}
and you can also do:
#TRIGGER {HP: &%dHPS~/256} {}
That way it's auto-assigning the variable.
The same thing would go for Ftg.
#TRIGGER {HP: &%dHPS~/256 Ftg: &%dFTGS~/112} {}
And that would solve it.
Icechild
mv -f message.text /dev/null |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sat Feb 01, 2003 1:44 am |
two triggers will fire on the same line but you might have a problem if your prompt isn't followed by a newline. (this doesn't explain exactly why the first one would work but not the second, maybe it has something to do with a second trigger being matched)
try:
#tr {Ftg: (%d)/112} {#var FTGS %1} "gauges" {prompt|nocr}
and see how that works
--------
moon.icebound.net:9000 |
|
|
|
Emit Magician
Joined: 24 Feb 2001 Posts: 342 Location: USA
|
Posted: Sat Feb 01, 2003 1:46 am |
oh, good catch, i forgot "/" was a special character now.
--------
moon.icebound.net:9000 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Feb 01, 2003 9:09 am |
First, check that the variable is actually controlling the gauge. This is easily done by manually assigning values to the variable. Type these in one at a time.
#VAR FTGS 0
#VAR FTGS 25
#VAR FTGS 50
#VAR FTGS 75
#VAR FTGS 100
#VAR FTGS 112
You should see noticeable differences. If not, go to the editor and check the values in the Gauge tab. You'll probably find a typo.
Next, check your fatigue
health
If fatigue is anything except 112, check the variable. It should have the same number you just got from health if your trigger is working.
#VAR FTGS
If fatigue is 112, change the variable to something else
#VAR FTGS 50
and then check fatigue again
health
Now check the variable one more time, and it should be back to 112 if your trigger is working.
#VAR FTGS
If your trigger isn't working, check the pattern (pay particular attention to spaces). The command looks okay, but make sure you don't have any typos (FGTS instead of FTGS, for instance).
LightBulb
Advanced Member |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Feb 01, 2003 9:41 pm |
If you're from Dragon's Gate MUD, the spacing between the FTG: label and the current fatigue level is 2 spaces for some reason.
li'l shmoe of Dragon's Gate MUD |
|
|
|
|
|