The only thing that I would change is the regex pattern. As written, it will capture, e.g., "an ancient tree" as the targetting variable - but trying to "kill an ancient tree" will likely not give the response you want
The pattern I had was
Code: Select all
(\S+): (\S+) >
Code: Select all
CurrentEnemy = matches[2]