Countdown Level Timer

By LadylexUK

I used this in my FPS game Wonderland Attacks. This is a countdown timer that is activated on a trigger censor and counts down from 4 minutes.

In a logic cube

  1. WHEN [in trigger zone][player]
  2. …WHEN [once] DO [numvar:start time][equals][game time]
  3. …/…WHEN DO [boolvar:timer on][equals true]
  4. WHEN DO [numvar:current time][equals][game time][minus][numvar:start time]
  5. WHEN DO [numvar:bonus time][equals][240][minus][numvar:current time]
  6. WHEN DO [numvar:displaymins][equals][floor][(][numvar:bonus time][divided by][60][)][modulo][60]
  7. WHEN DO [numvar:displaysecs][equals][floor][(][numvar:bonus time][modulo][60][)]
  8. WHEN [numvar:displaysecs][less than][10] DO [textvar:seczero][equals][0]
  9. …WHEN [else] DO [textvar:seczero][equals][nothing]
  10. WHEN [boolvar:timer on]
  11. …WHEN [numvar:bonus time][greater than][0] DO [display][text: BONUS: ][plus][numvar:displaymins][plus][text: :][plus][textvar:seczero][plus][numvar:displaysecs][screen top center]
  12. …/…WHEN [else] DO [display][textvar: NO BONUS][screen top center]

Comments are closed.

Powered by WordPress.com.

Up ↑

%d bloggers like this: