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: 657

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
964
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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top