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

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: 1533
Joined: Tue Mar 22, 2011 8:43 pm
Location: Alaska
Contact:

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

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: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

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