Yes, I tried both ways. The result is the same.
If you redefine the Trigger in the map itself, it works. With a different sender parameter. But you won't be rewriting the scripts of ready-made maps...
It is also desirable to add the standard alias for the Trigger function:
SetTrigger = Triggerto the end of that large piece of code that performs the override.It is probably used rarely or not at all, but it should still be taken into account.
Another question is about resetting the trigger, so that only the necessary one is reset. Would this be correct:
Trigger("NHF", OBJECT_TOUCH_TRIGGER, mob, nil);?
And if the Trigger(OBJECT_TOUCH_TRIGGER, mob, nil); is reset in the map itself, will it affect all of them?
However, emulation via Trigger(0, ...) is not possible, as this is equivalent to Trigger(NEW_DAY_TRIGGER, ...).
As I understand it, if the first parameter = nil, this is also a unique sender parameter.
If desired, the sender parameter can be placed at the end as an optional parameter, then any value can be sent as the sender, except nil (which will be equivalent to not specifying the parameter) and NaN (which is not indexed in tables because it is not equal to itself). This will require a small code modification.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4