To make a persistent recurring timer...

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

I have tried and tried to get a recurring timer event to remain persistent between systems. I have, so far, failed. Any event generated by <OnEnteredGate> remains in the system it is called in and all events running on the playership but began in a system in which the playership is not are canceled.

For now I will try Periculi's calendar, but it is annoying nonetheless. Does the calendar conflict with system26?

EDIT: it is really annoying, since the only thing I seem to be able to do (without some serious analysis is send a message, and the egg timer doesn't even seem to work -- days pass in Eridani on autopilot and the egg timer doesn't finish, seems to work fine in Lalande though)
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

You could just ask me for help with the timer- I never really polished the code because nobody seemed to care that I had made it. (Who wants a calendar on board when they can get Bigger Guns?)

Egg timer messages get lost easily. It worked, but the objSendMessage sometimes doesn't manage to get a message through.

Ugh! I don't want to hear about System26. It's been made completely obsolete- and new functions make it possible in 099a to do it better and easier.

I never tested the event manager in system26- however the version I posted changes the Stargates, and so does System26 so they would have conflicts if you tried to use them together. You would need to alter the firing method for Event manager by placing it in the line up for system creates- well, actually it's already in there- at least a call to a function waiting for it.

Are you sure you can't use the <OnUpdate> event? It's set for every 30 frames, which is plenty fast. Event Manager was set for 120 frames. But if you need a faster recurring timer, you can really slow the game down!

How fast does your update need to be?
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

(Who wants a calendar on board when they can get Bigger Guns?)
Everythings depends on the pictures :shock: on the calendar. :lol:
F50
Fleet Officer
Fleet Officer
Posts: 1004
Joined: Sat Mar 11, 2006 5:25 pm

Periculi wrote:(Who wants a calendar on board when they can get Bigger Guns?).
How about certain (future) mods that would like to trigger an event on a daily basis (and thus need a reference for days)? It is actually quite useful. Furthermore, there is no other nice way to get a timer to persist between systems that I know of.
Are you sure you can't use the <OnUpdate> event? It's set for every 30 frames, which is plenty fast. Event Manager was set for 120 frames. But if you need a faster recurring timer, you can really slow the game down!
I was trying to do it by adding things to the queue. But you are right that I could just hardcode it into <OnUpdate>
User avatar
Periculi
Fleet Officer
Fleet Officer
Posts: 1282
Joined: Sat Oct 13, 2007 7:48 pm
Location: Necroposting in a forum near you

It really depends on what kind of things you are doing.

And how many of them.

George mentioned that the <OnUpdate> events can get sticky if there are a lot of them. And, they aren't adjustable like the EM is.

I will try to get a new version of EM out- and hopefully make it easier to use this time. I have improved my skills a little since I wrote the last version. 8)
Post Reply