Try it yourself, add the following timer to any station:
Code: Select all
<OnCreate>
(block Nil
(objSetData gSource "ticker" 0)
(sysAddObjRecurringTimerEvent 30 gSource "OnCheckEntry")
)
</OnCreate>
<OnCheckEntry>
(block Nil
(objIncData gSource "ticker" 1)
(objSendMessage gPlayerShip Nil (cat "Tick: " (objGetData gSource "ticker")))
)
I thought maybe the problem was this gSource variable I use in the OnCheckEntry event handler? Is there another way of getting the object which fired the even except by gSource? I mean, since gSource is a global-ish variable maybe it gets mixed up with something etc.