I want to change my 'tummy' variable whenever I eat something with the word 'steak' in it. However, I am fairly useless when it comes to this sort of thing, this being the most complicated trigger/anything I have (and I spent about a week searching forums trying to get this), so I can't figure out how to get a match whenever 'steak' appears, so I ended up having to do this and just create a separate part for each food.
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="Kitchen"
keep_evaluating="y"
match="^You eat a (.*?)\\.$"
name="fridge"
regexp="y"
send_to="12"
sequence="95"
variable="onbalance"
>
<send>if "%1" == "burnt steak" then
SetVariable ("tummy", "steak")
elseif "%1" == "steak soup" then
SetVariable ("tummy", "steak")
elseif "%1" == "rare steak" then
SetVariable ("tummy", "steak")
end</send>
</trigger>
</triggers>
If there is a way (preferably one that at least looks a little similar) to match steak anywhere in the (.*?) (or however it needs to be changed), that would be a huge help. Also, I also want to be able to set it up to send set 'tummy' to 'chicken' if something with that word appears (in the same . (I'm not too concerned about chicken steaks). Once I see how to do this, I expect this trigger to get a little long so if it can be done without being ridiculously long, that would be even greater.
Question round two: is there a way I could send 'eat @tummy' to a variable, regardless of the result, in this same trigger without adding it to every possibility? I currently have the sequence at 95 just because I need another trigger to do that, and they don't like having the same sequence.
Question round three: while I want the 'eat @tummy' to be sent to the variable 'onbalance' in the trigger, I have no idea why it is said there. I only noticed it because I copied it, and if I change the 'send to script' to 'send to variable' the variable field is blank. (I guess this is unimportant, but I am a little curious)
Any help is appreciated! (And feel free to tidy up anything!)
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="Kitchen"
keep_evaluating="y"
match="^You eat a (.*?)\\.$"
name="fridge"
regexp="y"
send_to="12"
sequence="95"
variable="onbalance"
>
<send>if "%1" == "burnt steak" then
SetVariable ("tummy", "steak")
elseif "%1" == "steak soup" then
SetVariable ("tummy", "steak")
elseif "%1" == "rare steak" then
SetVariable ("tummy", "steak")
end</send>
</trigger>
</triggers>
If there is a way (preferably one that at least looks a little similar) to match steak anywhere in the (.*?) (or however it needs to be changed), that would be a huge help. Also, I also want to be able to set it up to send set 'tummy' to 'chicken' if something with that word appears (in the same . (I'm not too concerned about chicken steaks). Once I see how to do this, I expect this trigger to get a little long so if it can be done without being ridiculously long, that would be even greater.
Question round two: is there a way I could send 'eat @tummy' to a variable, regardless of the result, in this same trigger without adding it to every possibility? I currently have the sequence at 95 just because I need another trigger to do that, and they don't like having the same sequence.
Question round three: while I want the 'eat @tummy' to be sent to the variable 'onbalance' in the trigger, I have no idea why it is said there. I only noticed it because I copied it, and if I change the 'send to script' to 'send to variable' the variable field is blank. (I guess this is unimportant, but I am a little curious)
Any help is appreciated! (And feel free to tidy up anything!)