Adding A Timelimit: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
(added this page - WORK IN PROGRESS)
(No difference)

Revision as of 02:28, 5 July 2009

Template:Contents

Introduction

This tutorial shows you how to add a dynamic timelimit to your map. It allows you to end the map after a set amount of time which can be extended or lowered by various ways (a flag for example).

Limitations

As of Empires 2.24d there are some limitations to this system and changes have been suggested to use this further. Here is a non complete list of limitations:

  • The timelimit can not be displayed to user dynamically - the only possbility is to create "warnings" at a certain amount of time (i.e. 60 seconds left!)
  • The game will just end, but no team will actually win.

Tutorial

Basic Setup

For our basic timelimit setup we need 3 entities, logic_timer, math_counter and game_end. Place them anywhere in your map, but not in the void (= outside of the map).

game_end

As soon you have created your game_end entity, give it a recogniseable name. For example EndGame.


math_counter

This is our main entity. It will do the timelimit counting for us.

As we need to address it later, you should give it a recogniseable name. For example TimeCount.

Now we need to set the Initial Value property which will represent our starting time limit in seconds. In this example we'll use 300, which equals to 300 seconds.

 Keep in mind that maps do have commander vote times or wait phase times. 
 If you set this very low, you might get unexpected results such as a map ending shortly after the end of the vote time or even a map that ends in the vote time.

As soon you are done, we can proceed with the 2 next important properties, Minimum Legal Value and Maximum Legal Value. The time limit will not be able to go below minimum or to go higher then the maximum legal value.

Therefore these values represent our "time bounds";

  • The minimum time should be 0 as it's the most logical value to end the game on.
  • You can choose the highest value freely - we can use it later to limit the maximum amount the timelimit can be extended to; for example, if we extend the time on every flag capture it could render our timelimit useless if the flag gets captured a lot of times (as they value will be too high). To prevent this, we set a limit here: 900 (15 minutes)

Finally we check whether Start Disabled is set to No.

Image coming soon

Last but not least we need to create a Output to make sure the math_counter actually ends the game as soon the time reaches the minimum, 0. To do so, you need to go to the Outputs Tab (1) in the entities properties and hit the Add (2) button.

Image coming soon

Now you need to select the newly created output (1) and press on the little arrow next to My output named (2). As soon you are done, a list will open up. Select OnHitMin from the list (3).

Image coming soon

Credits

Omega_K2 - I created this guide xP

Links

(Link to example vmf coming soon)