I spoke with Vadi last night about this, but I still couldn't get it to work. Quite simply, in Aetolia, there are messages such as... "You are afflicted with <affliction>." and I want to do a trigger chain on them, but -only- if I have system.auto.bashing = 1
I made a function called "IsBashing()" which returns either a true, or false.
I made a trigger called Affliction.. The first trigger-line is, "You are afflicted with", and made the type a: begin of line substring.
The second trigger-line I made, "IsBashing()", with type of: Lua function
I then turned on multiline / AND Trigger (left line delta at 0, but I played with it for a bit- I don't know what it means).
So, I assumed that it would match 'You are afflicted with", then call "IsBashing()" - which would then return true or false. If true, it would continue my trigger chain, which holds.. epilepsy, paralysis, etc. If false, it would simply halt there.
However I cannot get this to work. If anyone could explain -how- if it's even possible, that'd be great. If not, if they could explain what the point of the Lua function option is, that would also be great.
Thanks.
(Triggers) Lua function option
Re: (Triggers) Lua function option
I haven't used functions in triggers extensively and I don't know if this will solve your problem completely, but I believe you have to put in 'return isBashing()' instead of just 'isBashing()'.
Hope it helps.
Hope it helps.
Re: (Triggers) Lua function option
That worked, thanks! I'm glad I had the original logic correct- I was just missing the 'return' keyword.
I think this way (for me, at least) is definitely much better than having a second trigger group that I have to enable/disable on the fly.
Thanks again!!
I think this way (for me, at least) is definitely much better than having a second trigger group that I have to enable/disable on the fly.
Thanks again!!