|
robthesilent Newbie
Joined: 05 Oct 2002 Posts: 7 Location: Australia
|
Posted: Wed Sep 24, 2003 9:36 am
capturing and updating strings |
> Snapdragon Road.
There are four obvious exits: e, n, s, w.
Orc citizen
> [ HP: 348/348 SP: 266/540 ]
> You ponder over some problem.
> You twiddle your thumbs.
> 329 413 clerk s
s
m clerk
n
hp
ponder
twiddle
City clerk's office.
There is one obvious exit: n.
Town clerk
A Sign
Tome of Quests
> Concentrating carefully, you tear into Clerk's mind in a psychic fury.
> Snapdragon Road.
There are four obvious exits: e, n, s, w.
> [ HP: 348/348 SP: 303/540 ]
> You ponder over some problem.
> You twiddle your thumbs.
> 329 413 clerk s
The '329 413 clerk s' is a button that evaluates @hp @sp @enemy @dir
as you can see, the hp and sp do not update when there are multiple appeances of the hp display bar. Also, when they are captured as part of a trigger they seem to fail more often - apart from having a 10 second alarm of {hp} how would you avoid this problem elegantly? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Sep 24, 2003 4:11 pm |
Elegantly? Wear a top hat and tails while scripting, maybe?
Buttons don't update unless the variables change. If you want them to change when you get the 'hp display bar', you need a trigger that works with the 'hp display bar' and changes the variables.
Pattern:
HP: (%d)/(%d) SP: (%d)/(%d)
Value:
#VAR hp %1
#VAR sp %3
NOTE: There appear to be two spaces before SP:. You'll have to insert the second one manually.
If you have to send 'hp' to get your HP/SP info, then you'll probably want to send it often enough to know when it changes. The things that usually cause HP and SP to change are actions (spellcasting, movement, etc), events (combat, spells, etc), and time (regen, poison, etc). Aliases can include 'hp' to monitor changes caused by your own actions. Triggers monitor events and alarms monitor time. I don't know what you could want; besides aliases, triggers, and alarms; that you think will be more elegant. |
|
|
|
|
|
|
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
|
|