question on matches[2]
question on matches[2]
So I am trying to figure out how to check matches[2] for certain words. Like if my target is zombie and I see "A nearly invisible magical shield forms around a small zombie." I have a trigger A nearly invisible magical shield forms around (.*). How can I make this check my target and if my target is the same as a word in the wildcard it will match? I am sorry if my question does not make much sense I am a bit tired
Re: question on matches[2]
Well...it depends on how you target....I'm assuming you just use 'zombie' rather than 'a small zombie'.
If you use 'a small zombie' then you can just do this.
Re: question on matches[2]
Thank you very very much
Re: question on matches[2]
I am getting an error that I cant seem to figure out Lua syntax error: )' expected near 'then'
Re: question on matches[2]
oh, add another ')' by targetVariable ....I'm bad about leaving out parenthesis when I use a function inside if statements...part of the drawback of using them when you don't have to, but I like the separation it gives.
Re: question on matches[2]
excellent thanks again