Countdown timer

Freeform discussion about anything related to modding Transcendence.
Post Reply
gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Mon Apr 04, 2016 2:51 pm

Is there a way I can get a countdown timer to work in Transcendence?

I'd like to make patch spiders hide if the ship takes armor damage and have a countdown available to the player, something like what happens with an irradiated ship, so the player knows how long the spiders will be hidden before they can emerge again.

I'm thinking of using something like this:

Code: Select all

(setq countdown 120)

Code: Select all

<OnUpdate>
  (block Nil
    (setq countdown (subtract countdown 1))
    ; do something to let the player know how the countdown is progressing
    (if (leq countdown 0)
      ; let the patch spiders know they can come out again
      )
    )
</OnUpdate>
Is there a built-in, simpler way to do what I'm thinking of above?

shanejfilomena
Fleet Officer
Fleet Officer
Posts: 1483
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska

Tue Apr 05, 2016 6:20 am

you might want to look at Repair Droids http://xelerus.de/index.php?s=mod&id=579
Flying Irresponsibly In Eridani......

I don't like to kill pirates in cold blood ..I do it.. but I don't like it..

gunship256
Militia Commander
Militia Commander
Posts: 451
Joined: Sat Jul 25, 2015 11:41 pm
Location: repairing armor

Tue Apr 05, 2016 1:40 pm

Thanks! It looks like that mod makes a countdown timer the way I suggested, by iterating a variable during <OnUpdate>.

I'll go ahead and use that method if I can't find a simpler way.

User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2615
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Wed Apr 06, 2016 11:30 am

http://xelerus.de/index.php?s=mod&id=307
Battlezone mod has a countdown timer with a display.
You might want to have a look at that too.

The mod is really old, it might not work at all.

Post Reply