Unknown2009-02-06 16:55:08
Hi! I have some trigger questions.
Let's use the following line as an example.
To trigger this line correctly, would it be:
Also, is there a way to trigger all of it, even if you have textwrap on? Or is the only way to successfully make it a trigger to have textwrap off?
Thanks ahead of time for your help!
Let's use the following line as an example.
CODE
Someone swings a badass axe with a fiery aura at you. You are sliced across the chest, laying open a flap of skin which bleeds profusely.
To trigger this line correctly, would it be:
CODE
^(%w) swings (%w) at you. You are sliced across the chest, laying open a flap of skin which bleeds profusely.
Also, is there a way to trigger all of it, even if you have textwrap on? Or is the only way to successfully make it a trigger to have textwrap off?
Thanks ahead of time for your help!
Unknown2009-02-06 16:57:16
^(%w) swings * at you. You are sliced across the chest, laying open a flap of skin which bleeds profusely.$
It's possible to trigger these with word wrap on, though very difficult to do it well. Also, I'd recommend separating the first parts (the attacks) from the second parts (the afflictions or wounds).
Unknown2009-02-06 16:59:41
QUOTE (Zarquan @ Feb 6 2009, 11:57 AM) <{POST_SNAPBACK}>
CODE
^(%w) swings * at you. You are sliced across the chest, laying open a flap of skin which bleeds profusely.$
It's possible to trigger these with word wrap on, though very difficult to do it well. Also, I'd recommend separating the first parts (the attacks) from the second parts (the afflictions or wounds).
Thanks!
But what's the $ for?
Unknown2009-02-06 17:00:46
Just as ^ anchors it to the beginning of a line, the $ anchors it at the end.
Abethor2009-02-06 17:13:10
Does the * take into account the multiple words? I'm teaching myself how to code so little things like this are kind of useful to know.
Unknown2009-02-06 17:15:06
Abethor2009-02-06 18:03:29
Ah, thanks for the link, it helps a lot!
Unknown2009-02-06 18:12:18
And for any of you building a system and working on warrior lines like this, don't trigger the whole line like that:
Trigger the 'swings at you', 'with a focused look', etc, etc, etc to enable another class called "IveBeenHit" or something, and within this class have a few choice words triggered to actually give you afflictions, then have the prompt disable that class again, so it's only active when you've been hit.
Also, for wounds on arms/legs, within that 'IveBeenHit' class, you're going to want a trigger off of 'left' and 'right' that enables a 'side' class, so you know what arm needs the wounds.
Trigger the 'swings at you', 'with a focused look', etc, etc, etc to enable another class called "IveBeenHit" or something, and within this class have a few choice words triggered to actually give you afflictions, then have the prompt disable that class again, so it's only active when you've been hit.
Also, for wounds on arms/legs, within that 'IveBeenHit' class, you're going to want a trigger off of 'left' and 'right' that enables a 'side' class, so you know what arm needs the wounds.