recurring timer events for items?

Freeform discussion about anything related to modding Transcendence.
Post Reply
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

could we have recurring timer events for items please? It would be so much easier than duplicating things for all of the playerships.
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

What are you trying to do? I have been writing all kinds of timer functions lately, and might have something to help already written. :)
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Right now I'm just trying to put a recurring timer event somewhere where it can be accessed all the time by the player invoking an item (tractor beam). I've wanted to do this several times before. The tractor beam works, btw, but it could take another recurring timer on the part of any AI ship that wishes to use it to check for any targets being close before using it. This means system lag.

Mostly I was just asking for it to be made more convenient, but yes, your mod solves it too. Actually, the tractor beam isn't that interesting or helpful for the player, its mostly just fun to send senseless docked ships flying into uncharted space.
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

Actually, the tractor beam isn't that interesting or helpful for the player, its mostly just fun to send senseless docked ships flying into uncharted space.
And I am a big fan of sending things flying into uncharted space! :)

Sounds like you need something specific to the weapon with a faster cycle run than the event manager. Couldn't the timer get turned on with the invoke?

A system timer might work, and anyone using a tractor beam would be able to access the same timer in the system.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

the tow hook now has some features that may help you, for one it puts the recurring event on any playership(by storing it on a station), and it cancels the event when used again(stores it's "on" state on a system variable). it's not quite a recurring event on an item, but it is a good workaround. you can download here to view the code, but it is uncommented and may be confusing.
Post Reply