1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  4. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  5. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  6. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  7. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  8. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  9. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[General] Single timer

Discussion in 'World Editor Help Zone' started by Krogoth, Aug 7, 2013.

  1. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Use of constant single timer with .03 period with time counter that imitates a lot of timers with different periods

    How much slow it would be? (Very slow, slow, quite fast)

    Note that we already have to use time counters sometimes (or integer counters, does not really matter)
     
  2. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,609
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    I dont understand what you want...

    One can have counters for 3 different systems in the same trigger
     
  3. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Very slow.

    Anyways, if you want a merging timer, use Timer Tools. If you want a constant timer, use CTL32
     
  4. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Nestharus' TimerTools does that (iirc). It is certainly plausible--and it is very nice for mapmaking since it saves you from having multiple timers with similar periods when you only need 1.

    EDIT: Almia beat me to the post.
     
  5. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Can't agree with you. 1 function call inside 0.03 timer already slower than counter. We still use a lot of functions.
    Hmmm :ogre_hurrhurr:

    Thanks!
     
  6. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Actually, Mag studied the timer's behavior, and he tested a one map, one timer system, but it came out very slow. He also warned me of making a like.
     
  7. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    hmm thats interesting. Can you tell me what else he came up with when testing that ?
     
  8. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    IDK. Though, creating a One Timer,One Map is seriously a very bad idea.
     
  9. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    ^ It is not
     
  10. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    Why is that ?
     
  11. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Iterating over instances, trigger evaluation, and using a hashtable for "timer" container.
     
  12. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    ooo wow ok now i see what u mean.
    I've never tried it b4 thanks for the warning and info
     
  13. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    wat?
     
  14. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    You need a 2D array for creating a One Map, One Timer system.

    edit
    dimf beat me to the number of posts ;_;
     
  15. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    if u use one timer u would have to store the data in the time period on what u want to run at that time. An array is simply to small so u would have to use hashtable.

    yup but u beat me to this.

    Also what do u mean number of posts ?
     
  16. Krogoth

    Krogoth

    Joined:
    Apr 5, 2011
    Messages:
    247
    Resources:
    0
    Resources:
    0
    Why small? 8k timers, 8k data.
     
  17. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Think of it as creating a custom timer from a timer, and you will need to cache the following:
    1) first, you need to create a list from a given timeout(E.g 0.03125 = new list, 0.05, new list)
    2) Index a new custom timer to the given timeout's list
    3) Cache the data of the custom timer

    And, because of the mass list, you can hit the op limit.
    It is like iterating a list of list and iterating that list's data :/
    And also becoming slow because of calling Load Blah blah from hashtable

    Btw, you can imagine one custom timer as this:
    Timer[timeout][timerid]
     
  18. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    yes but they would need to be linked which is easy.

    But u would also have to use an array to keep track of time so u know when to trigger the data to run.

    dang almia u beat me again
     
  19. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,860
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    dimf has 4000 posts
    Im going to die X_X
     
  20. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    haha thats funny just dont actually do it.




    <--- 4001 not 4000 lol