Trigger capturing

Post Reply
herbert
Posts: 16
Joined: Mon May 11, 2015 4:47 pm

Trigger capturing

Post by herbert »

name4, name3, name2, and name1 are suffering the effects of your dissonance vibration.

I get this sort of trigger in a game I play and I have this code to capturing ONE of the names (if im targetting them) but doesn't seem to be working..



trigger - ^(.+) [are|is] suffering the effects of your dissonance vibration.$ - perl regex

if matches[2]:find(target) then

TrackEnemy("dissonance")

end


The track enemy is my own tracking (it works its the matches[2]:find(target) which I think is working wrong..

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: Trigger capturing

Post by Belgarath »

Try changing the [are|is] to (?:are|is) or simply a \w+ and see if it solves your problem.

User avatar
Akaya
Posts: 414
Joined: Thu Apr 19, 2012 1:36 am

Re: Trigger capturing

Post by Akaya »

Could also be a case sensitivity issue. For instance if your trigger line is:

Akaya, Herbert, Belgarath, and Heiko are suffering the effects of your dissonance vibration.

and your target value is: "heiko" it will not match.

herbert
Posts: 16
Joined: Mon May 11, 2015 4:47 pm

Re: Trigger capturing

Post by herbert »

its not case sensitive its just when its one person its 'is suffering' and for more then one its 'are suffering' I just used \w+ but yet to test it

Post Reply