According to Cycrow, "Secondary signal attacked was fixed in 2.5"
I have not tested this, yet, but most likely this library is no longer needed.
Secondary SIGNALS do not work. (at least not for SIGNAL_ATTACKED)
I tried and tried for about 12 hours but eventually gave up.
A seconday SIGNAL_ATTACKED fires... sometimes. Or rather once in a blue moon. On some ships.
According to Cycrow they fire before primary signals (which work perfectly fine) so since they not always fire before, they are apparently broken.
No point in crying about it so... here's a library for I guess...
Tertiary Signals
[ external image ]Download: ZIP
Currently only 4 events are checked:
!ship.signal.attacked
!ship.signal.attacked.ts
!ship.signal.attacked.bigship
!ship.signal.attacked.khaakth
Two lines have to be added to the corresponding Egosoft scripts. (see next post)
Only necessary if you want to support additional signals.
Usage:
Code: Select all
@ = [THIS] -> call script 'lib.gz.tertiary.signal.handler' : attacker / call script name=$attacker action=$action !ship.signal script name=$Script.Name
You configure things by directly calling the library.
Action can have 3 string values.
- "add"
The script name supplied as "attacker" is added to the list.
It will be executed everytime the parent script runs.
Example:Now 'plugin.case.of.beer.attacked' is always called before the actual !ship.signal.attacked is fully executed.Code: Select all
@ = [THIS] -> call script 'lib.gz.tertiary.signal.handler' : attacker / call script name='plugin.case.of.beer.attacked' action='add' !ship.signal script name='!ship.signal.attacked'
- "remove"
The script name supplied as "attacker" is removed from the list.
Example:'plugin.case.of.beer.attacked' is detached from this signal script.Code: Select all
@ = [THIS] -> call script 'lib.gz.tertiary.signal.handler' : attacker / call script name='plugin.case.of.beer.attacked' action='remove' !ship.signal script name='!ship.signal.attacked'
- "print"
All scripts attached to this "name" (like 'SIGNAL.ATTACKED.ALL') are printed to a logfile.
This is the number of the logfile that the library will print to.
All relevant actions can be logged so if you "lose" a tertiary signal, it will show in the logs as being executed.
All rules for normal signals apply.
If your custom signal script has a duration (any kind of wait...) then all further signals to this ship are blocked.
Avoid this unless you are absolutely sure that this is what you want to achieve.