|
Talonnb1 Beginner
Joined: 14 Apr 2006 Posts: 11
|
Posted: Tue Feb 13, 2007 4:30 am
Delaying variables being changed |
Let's say I have this line:
With a steady hand, Whoever batters your right leg with a blackened warhammer.
Your right leg breaks from all the damage.
What I want to do is trigger the 'with a steady hand, (%w) batters your' to #var attack = 1;#var attacker =%1
Then do 'Your right leg breaks from all the damage.' #var temprestrightleg 1
My problem is, is there any way, I can just #var restrightleg 1 with some kind of delayer that will let me trigger something on my prompt to check an array of attackers against @attacker and if nothing is found as a valid match, that it just ignores the changes rather than applying them. If the attacker is found valid, then I could tell it to process the variable being assigned a value. It's going to be for illusion checking, so not sure I'm making full sense.
In essence, prompt, something happens, variables get assigned, checker for target fires on next prompt, and processes the variables accordingly. |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Feb 13, 2007 4:47 am |
Why does it have to wait until your prompt?
#trig {^With a steady hand, (%w) batters your ({right|left}) ({leg|arm}) with a blackened warhammer.$} {#var attacked %2%3;#var attacker %1}
#trig {^Your ({right|left}) ({leg|arm}) breaks from the damage.$} {#if (@attacked=%1%2 AND %ismember(@attacker,@attackerlist)) {#var rest%1%2 1} {#say Illusion detected - @attacker did not attack before %1 %2 was broken}}
Then add a line to your prompt trigger that sets attacker and attacked to null.
Alternatively, you could make the first trigger activate the second through #t+ or even make it a trigger state of the first with the Within parameter set to 1. |
|
|
|
Talonnb1 Beginner
Joined: 14 Apr 2006 Posts: 11
|
Posted: Tue Feb 13, 2007 4:59 am |
hmm, problem is, hallucinations and illusions can be more than 2 lines long, so this idea would only work limited. Someone could put the break thing first, then another attack, then another break. There are many variations, so I figure triggering off the prompt will be best this way the whole illusion is included.
|
|
|
|
|
|
|
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
|
|