Page 1 of 1

Make a script trigger event effect

Posted: Wed Mar 26, 2025 7:08 pm
by PennyJim
We now have CustomEventPrototypes, and I think this promotion should trickle down to the script triggers. This could be by modifying the script trigger effect, but I'm thinking more like an alternative effect entirely.

I fairly regularly make my script trigger handlers a lookup based on the effect_id, but being able to specify an entirely separate event would let that kind of filtering be on the Engine side instead of Lua.

I also sometimes put 'arguments' encoded into the effect_id, and some field like effect_id that would be passsed along the EventData for the CustomEvent would allow me to actually use those arguments without string manipulation before the lookup.

I would prefer the arguments to possibly be fairly arbitrary, but I don't hold out much hope for anything more than a string or maybe an array of strings.
The Ultimate idea would be a table of key value pairs that are put into the EventData (erroring on any keys that would squash the normal values). I don't hold any hope for that though.