Adding A Timelimit

From Empires Wiki
Revision as of 09:27, 10 August 2017 by Thexa4 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

The next step is to selet the entitiy we want to target. There are to ways to do that, either we type in the name we've choosen earlier, EndGame, next to the box reading Target entities named (1a) or we select the pipette (1b) and point it to an entity in the 2d or 3d view.

Image coming soon

As the game now knows which entity we are targeting the time has come to tell it what Input we want to give to our game_end entity. As we want to end the game, we'll have to fire the EndGame input. To set this up, we firstly open up the list of Inputs by pressing on the small arrow next to the box Via this input (1). Then we need to select EndGame from the popped up list (2).

As we are done with this entity, we just need to press on the Apply button in the bottom right corner (3) to save our newly created Output.

Image coming soon

Credits

Omega_K2 - I created this guide xP