Hey I am playing around with creating some on demand triggers using AddTriggerEx and want to generate one that is named maxHealthTrigger which sends the contents of a wildcard to a variable called maxHP. This is what I got so far
However when I look at the trigger created it is called maxHealthTrigger and that is the target Variable as well. Is there some option I am missing or do I have to use that name as a variable?
You would have to go through afterwards and change the option of the variable (SetTriggerOption). You could also send to script, and then use that to send to the variable in the send text.
Why are you adding a well defined trigger through a script anyway?
Well I don't want this trigger to be around unless I look at the SCORE command which lists my maximum health among other things, so I have an alias sc that creates some triggers and then runs through the score command and removes the triggers again when I receive the last line of the score sheet. I figured that I would just make a group though and disable the group only enabling it when needed, but it is also nice practice.
Could probably make a trigger wizard if I wanted which I might end up doing.
It would probably be much easier to just have some triggers preset (in a plugin) and simply enable them all as a group when typing "sc|score|scor|etc", then disable them on a prompt. It's also likely to be much faster. How much faster depends on the number of triggers you are using - the more triggers, the bigger the difference, since 5 triggers mean 5 calls to AddTriggerEx, while with EnableTriggerGroup it takes only one call for any number of triggers.
Yeah well that is what I did in the end, but like I said I am still learning about all functions I can use and how they work.
I did get something to work to make triggers with standard options easily. I can now use an alias standtrig with the trigger line as argument and it makes a trigger with standard option to which I then later only add the send info.