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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  4. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  5. 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.

[Snippet] OrderQueueLite

Discussion in 'Graveyard' started by Ender, Feb 8, 2013.

  1. Zeatherann

    Zeatherann

    Joined:
    Nov 25, 2008
    Messages:
    1,303
    Resources:
    6
    Skins:
    1
    Tools:
    1
    Maps:
    4
    Resources:
    6

    How does this work? How can it issue the next order when the first one is done? How can it check if the first is done?

     
  2. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,709
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    I have to test if this is working as intended. I think there is no chance that the author
    does any further updates, if something is not working.

    What I miss is an internal optional cooldown between too orders. Currently you order
    the next order once the units current order is 0 and the instance is not paused, with an inaccuracy up to of 0.0315
    Nicer would be ( order 1, cooldown 5 seconds ) --> 5 seconds later + condition ( order == 0 ) fire next order. --> run optional cooldown

    Edit: Ok I just saw you can pause an order queue from outside via boolean.
    Bt it seems hard to determine, when to pause an unit. Like I said an internal cooldown would be a win.

    In my opinion not only order 0 but also smart and attack ( don' know the ids by heart ) are also
    valid to fire a new order from the queue
     
  3. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,156
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    This could definitely use OrderEvent (the function RegisterAnyOrderEvent is useful here). Instead of using disable/enable trigger, just set a boolean and don't switch into the if/else block if the boolean is flagged.

    Also: return (R2I(I2R(i)/I2R(totalC)) == i/totalC)

    That's exactly the same as "return i/totalC == i/totalC" and thus "return true". The only time you use I2R (or int + 0.00) in division is to avoid truncating. But then you... truncate. I think you may be looking for ModuloInteger here, but it is hard to tell.
     
  4. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,156
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Author hasn't been online in years. Graveyarding.
     
  5. Ender

    Ender

    Joined:
    Jan 28, 2012
    Messages:
    208
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    I just returned from my two year vacation.

    I have no idea what i was doing here honestly... I will update it soonish.
     
  6. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,156
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Welcome back! I'll move this out of the gy if you intend to work on this.
     
  7. Bannar

    Bannar

    Joined:
    Mar 19, 2008
    Messages:
    3,087
    Resources:
    20
    Spells:
    5
    Tutorials:
    1
    JASS:
    14
    Resources:
    20
    Smells like signature material.
     
  8. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,260
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    No changes were made since the last discussions in thread.

    @Bribe, do you remember testing the code? If it's just tiny critiques we might eventualy fix them ourselves and update the main post.
    But if Ender doesn't care anymore we might also graveyard it again, as it seems he didn't make wanted updates after he posted above.

    edit: as no changed were made and author is inactive I won't review it again, but move it to graveyard again.
     
    Last edited: Oct 12, 2016