System DotA Time System

Mike889

New Member
Reaction score
15
Introduction:

Ever wondered how the clock system of DotA worked? Or, are you making a map and need to implement a watch, but you can't mess up with leaderboards and timer windows? So this tutorial is for you. I'll teach how to create the DotA Time Template easily.

Notes:
•This time system was made to be used with the International System of Measurements (IS). Therefore, it uses "minutes" and "seconds", being a minute equal to 60 seconds.
•The time system requires that you don't use Food and/or not Lumber in your map.

The needed things:
•A sheet of paper; pointless scissors; glue; a number 2 pencil; a sharpner.
•Edit the Gameplay Interface for your needs
•Basic knowledge of how to create triggers. (It's easy, you can learn from this too!)

The Lessons:
•First of all download the icons I made for the time system, although you can use whatever you want. The icons are within the sample map.
•Import the icons:
410f2b08.jpg
•Change their custom paths to:
ReplaceableTextures\CommandButtons\BTNWatch.blp
ReplaceableTextures\CommandButtonsDisabled\DISBTNWatch.blp
ff8c9956.jpg
•Mess with the Gameplay Interface, chaging icons and tooltips:
69a3147f.jpg

4ec3c7b7.jpg

4849c05c.jpg
Make Sure you ticked "Use Custom Interface"!!

Now here comes the triggering!

Do those triggers:
(The functions used are under the Players tab).

55977523.jpg

96900f70.jpg

093167ac.jpg

f905563c.jpg


The Ingame result:
7c9c8969.jpg
 

Attachments

  • timesystem.w3x
    26.7 KB · Views: 654

Sim

Forum Administrator
Staff member
Reaction score
534
Any screenshots of the final results?

I'm curious about this food cap/food used thing.
 

Mike889

New Member
Reaction score
15
Hmm.. i'll make the food used/cap so, xD I'll edit this post to put the ScreenShot.
Here it is, although i think Lumber/Food is prettier:
imagem2-1.jpg
 

Sim

Forum Administrator
Staff member
Reaction score
534
The picture about food and lumber should be within the food and lumber category while the food only picture should be located within the food category. :)
 

Romek

Super Moderator
Reaction score
963
Wouldn't that have 61 seconds per minute?

..57, 58, 59, 60, 0, 1, 2

Either make the condition to 59 food/lumber
or set the lumber/food to 1 instead.
 

soulreaping

New Member
Reaction score
17
As Romek said, there are 61 seconds between 0:00 to 1:00(for example).

The way I'd do it is to use variables.

Before adding any lumber/food, check if the food variable is greater than 60, then set it to 0 and add 1 lumber.
 

Mike889

New Member
Reaction score
15
As Romek said, there are 61 seconds between 0:00 to 1:00(for example).

The way I'd do it is to use variables.

Before adding any lumber/food, check if the food variable is greater than 60, then set it to 0 and add 1 lumber.
Okay, tomorrow i will do it! ^^
 

vypur85

Hibernate
Reaction score
803
Code:
GameTime
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) Food used) Less than 59
                    Then - Actions
                        Player - Add 1 to (Picked player) Food used
                    Else - Actions
                        Player - Set (Picked player) Food used to 0
                        Player - Add 1 to (Picked player) Current lumber
You can add a condition in the periodic trigger. Then you'd only need one trigger, I think. :)
 

Mike889

New Member
Reaction score
15
Code:
GameTime
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) Food used) Less than 59
                    Then - Actions
                        Player - Add 1 to (Picked player) Food used
                    Else - Actions
                        Player - Set (Picked player) Food used to 0
                        Player - Add 1 to (Picked player) Current lumber
You can add a condition in the periodic trigger. Then you'd only need one trigger, I think. :)
Well, i couldn't find "Picked Player Food used Less than 59, so i just remade some little things, and i realized another way to prevent many events, =X



---Anyway, sorry for my english if it's too poor. I am brazilian, xD I can understand almost everything i read, but when i need to write, words flee from my head. Also i ain't good with hearing people talking in english. >.<
 

vypur85

Hibernate
Reaction score
803
Why did you changed the codes to screen shots? I felt that the previous one was better (my opinion though).

Code:
((Picked player) Food used) Less than 59
Should be in Integer comparison, if I'm not mistaken.

>there still will be about 0,1 seconds missing
The timer should not display the number '60'. After 59, it will turn 0. That's all I think. :)

>Ah, little question: Is my english good? Could you understand this tutorial? Was it helpfull?
Anyway, your english is good. I mean, it's readable and understandable :). And your tutorial really helps :). It's simple for some people but I think there are still many out there that don't know how to do this.
 

Mike889

New Member
Reaction score
15
Updated to 60. However its necessary to refresh you cache in order to view the new image, xD Otherwise the old picture that will be loaded. For those that don't know how, if you use FireFox just go Tools>Clear Personal Data (or simple press CTRL+SHIFT+DEL) ^^
 
L

Lelouch

Guest
can any1 help me with this problem

when I added all the codes(as shown from the screen shots)

the seconds(food used) add 1 immediately

but it stays at one not adding anymore help plz
 

FrozenShadow

I am a WolfieeifloW fan.
Reaction score
75
Are you a 100% sure about that? Because it looks to me that the triggers in this system works.
 
L

Lelouch

Guest
how bout I just send u my map so u can check it?

oh yeah I used the dota template from the tutorial site if some1 needs to know
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top