TriggerReactor

TriggerReactor

24.6k Downloads

Add additional command /trg call

MidnightSugar opened this issue ยท 4 comments

commented

One major compatibility issue that needs to be fixed is being able to trigger scripts from a yaml file.

Having " or # causes a lot of problems when working in yaml configuration files.

We need to be able to trigger named triggers using yaml. And the easiest way to do that would be to add in command:

/trg call -namedtrigger-

This will call the named trigger containing all the scripts. No " or # in the command.

commented

@MidnightSugar
Just make a command trigger!
/trg cmd call

#CALL args[0]

/call named

commented

Yes command trigger was one of the first thing I tried. But it just says command doesn't exist when I do it from console.

I still believe /trg call command works better since it matches the call executor which does the same thing.

commented

@gerzytet @MidnightSugar
This seems more like he wants to run some Trigger from the other plugin like custom item.

I think dispatchCommand can't detect command trigger, so adding manual command would be helpful

/trg interpret perhaps?

commented

@MidnightSugar
I somehow misunderstood /trg call as /trg run. oopsy


@gerzytet @MidnightSugar Review request

Proposal

New command /trg call <named trigger> to help other plugins using dispatchCommand() based method to run named triggers of TR.

We may also give an optional [code] argument after the <named trigger> so that the code will be executed right before the named trigger run. It would be helpful to initialize the variables in the named trigger. [codes] run just like /trg run (run the code in temporary command trigger. However, the named trigger should inherit the variable space of the temporary command trigger.)

/trg call <named trigger> [codes...]