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. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. 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.

Create a sucessfull timer with window (reuploaded)

Discussion in 'Trigger (GUI) Editor Tutorials' started by Cheezeman, Sep 7, 2008.

  1. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Create a sucessfull timer with window

    How to create a successfull timer


    This tutorial will show you how to make a successfull timer with a proper window using GUI.



    Prologue


    So the tutorial is done... not even close to what I hoped it would be since it's quite simple and short. Wish I could post a tutorial on a more usable topic since anyone engaged enough in world editing can do this by him/her -self.
    If any admin see this, don't waste your time with a review. Even if it would pass the test the, as I said, topic isn't very interesting or useful.
    Also, this is a reupload. I made this in August (I think at least) and by that time I didn't know double posting was forbidden.
    Please, forgive my acts. I was just a child.


    Introduction


    I've noticed when playing Battle.net games that many of the timer windows never disappear.
    This may be caused by, for example, using

    • Timer 1
      • Events
        • Time - Timer[1] expires
      • Conditions
      • Actions
        • Time - Destroy (Last created timer window)


    In this case the destruction of a Timer[1] refers to (Last created timer window) which can be another timer, meant for resurrecting a Hero for example.
    It can get very anoying to have 5 timers that says 00:00:00 blocking the sight and disables vision of other timers...
    I wish to help you with this :thumbs_up:

    Timers can be used in any map for any reason. Most common cases are
    - Using it to show when you get your next income
    - Using it to show the amount of time there is left to finish a map.
    - Using it to show when the game starts.
    - Using it to show when your Hero resurrects.
    - Using it to show when the next creep spawning level will begin.


    Dictionary


    Or "words that may come in handy"


    GUI Trigger
    • GUI Trigger
      • Events
      • Conditions
      • Actions


    Variable
    A variable is "something that can store somthing of it's kind"
    (You should check out a tutorial on variables to get the idea of what they are)
    If a variable was an integer, we called it "X" and it was equal to 3; X+2 would be the same as 3+2.
    Or if the variable was a unit, we called it Super_Hero and it was equal to Blademaster 0001; we could use it in a map initialization:
    • Initialization
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Hero - Set Super_Hero Hero-level to 10, Hide level up graphics

    (If you don't get the idea follow my advice and visit a tutorial for variables)

    Using [ ]
    I use [ ] to represent variables and similiar stuff which is supposed to be read as one string. Very useful when reading lots of texts.


    Tutorial Start


    Part One


    Creating Variables

    (To create a variable, go to [Trigger Editor->Variables])
    Picture
    [​IMG]


    Create the following variables:

    Timer
    Timer Array
    New Timer (Default)

    TimerWindow
    Timer Window Array
    - None -

    Explenations:
    The first is the timer itself, which is not to be confused with the timer window.

    The second is used to enable the destruction of the timer window.

    Part Two


    Triggers


    • TheTimer Start
      • Events
        • Time - [Your event]
      • Conditions
      • Actions
        • Countdown Timer - Start Timer[1] as a One-shot timer that will expire in [YOUR TIME] seconds
        • Countdown Timer - Create a timer window for Timer[1] with the title [YOUR TITLE]
        • Countdown Timer - Show (Last created timer window)
        • Set TimerWindow[1] = (Last created timer window)


    Now you're almost done. The only thing we need is to destroy the timer.

    • TheTimer Destroy
      • Events
        • Time - Timer[1] expires
      • Conditions
      • Actions
        • Time - Destroy TimerWindow[1]


    As you can see, the action destroys TimerWindow[1] - which we previously set as the window for Timer[1] - and not (LastCreatedTimer) which could destroy any timer as long as it's the last created one.

    Instead of creating 2 triggers for each timer you want to make which all say that "when this trigger runs out, destroy the window for it", you can combine this into the action you want to happen when it runs out.

    Example of use:
    • Hero Revive 1
      • Events
        • Time - HeroReviveTimer[1] expires
      • Conditions
      • Actions
        • Time - Destroy HeroReviveTimerWindow[1]
        • Hero - Instantly revive Hero[1] at (Center of (Hero Revive <gen>)), Show revival graphics



    Credits

    Thanks to Airandius for extreme review :thumbs_up:
    It really helped me a lot.
    Unfortunatly, since I changed the entire tutorial, you will have to do it again
    If anyone catches any of his posts, please, give him +Rep.


    The Very End


    May seem a little fair and simple, but since many map makers still don't know how to do this I felt responsible to create a tutorial.
    It's mainly for the sake of destroying the right timer window and not destroying a timer that is still running...
    If any of you wonder why I changed the whole tutorial from [really advanced hero siege creep leveling] to [simple timer window tutorial], it was just for that purpose: Make it a [simple timer window tutorial] and not go too much off-topic...
    I think I'll make a tutorial later on [how-to create an extreme hero siege/tower defence creep-spawning system], which was my first idea of the tutorial

    P.S: This was my very first tutorial.

    Happy Map-making! :thumbs_up:
     
    Last edited: Oct 27, 2009
  2. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    I can't belive I still havn't got any response...
     
  3. Hawkwing

    Hawkwing

    Joined:
    Nov 28, 2006
    Messages:
    5,829
    Resources:
    28
    Models:
    15
    Icons:
    3
    Packs:
    1
    Skins:
    8
    Tutorials:
    1
    Resources:
    28
    You must use the

    (header) tags, otherwise this wont get approved.

     
  4. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    I'm not a mod, but in any case I will give you a full review of your tutorial.
    (Better prepare yourself.)

    Introduction [5.5/10]:

    It's good that you tell us what this tutorial is going to do, it will help us with timers.
    But you made some (minor) mistakes in your introduction:

    This is disturbing me a, timers can be used in almost every map type, so give us more examples.
    A few (basic ones) are:
    - Using it to show when you get your next income
    - Using it to show the amount of time there is left to finish a map.
    - Using it to show when the game starts.

    The main reason for you (rather low) score is because you told us wrong information.

    This is incorrect, a variable is nothing more then something that can store something of it's type.
    For example you are talking about an integer variable; it saves a number.
    You also have real variables, they also save number but instead of 1, 2, 3 like integers they will store 1.00, 2.00, 3.00.
    Some thins in the WE are saved in integers, while some are saved as reals.

    Your second part about variables is correct however. Just say that variables can store anything you want for later use.
    You can also use variables to store certain things (like points or groups) so you can destroy them later (to prevent leaks).

    Also instead of using: 'Words that might come in handy:' call it: 'Basics:'.


    Tutorial [3/10]:

    #1: You use an integer to keep track of levels, however this tutorial was to show people how to proper create and remove timers from a game.
    You should first tell them how to create a trigger, how they work, what they do and how to clean them properly.
    I suggest you put the 'extra' part. So basically the example in the next section.
    So you'll get two sections, a basic timer section and a section that gives you an example how to use it. In your case a defense.

    #2: (Your example.) You don't have to create a new timer for each level, you can use a timer that keeps looping, and when that timer ends you create 'x' number on units of type 'y'.
    For the units you can make an initialization trigger to store all units of each level to a variable array.
    Then use an integer to increase the level.

    • Initialization
      • Events
        • Time - Elapsed game time is 0.01 seconds
      • Conditions
      • Actions
        • Set UnitTypeVar[1] = Peasant
        • Set UnitTypeVar[1] = Footman
        • Set UnitTypeVar[1] = Knight
        • Set UnitTypeVar[1] = Rifleman


    Can you see what I mean? This is way better then to create 50 timers for example, instead of 50 triggers you only need 2.
    One to set the levels, and one to 'increase the level' + 'spawning actions' when the timer ends.
    Of course you should not destroy the timer window in this case, only at the last level.

    #3: Your triggers leak, please clean them. If you do not know what I'm talking about then go here.


    Other [3/5]:

    #1: I saw a link to a picture attachment, use image tags to show your images. It might be best if you hide it with a spoiler.
    - Spoilers are used like this: [ HIDDEN="<insert title here>"]<insert hidden stuff here>[/HIDDEN ] of course remove the spaces inside the brackets.
    - Images tags are used like this: [ IMG]<Image URL>[/IMG ] of course remove the space at the end.
    Put the image tag inside the spoiler and you can show your images on your thread, people only have to click the show button.

    #2: Give your titles a nice color to them, this way new parts of your tutorial are noticed better.
    Just don't spam colors.

    #3: This tutorial is very simple, so the overall usefulness of this trigger is not ensured.
    Not to forget that timers and their windows are a very easy part of the editor, it's usually the 'new', 'bad', 'noob' mapmakers that leave these kind of small mistakes for what they are.
    Forgive for saying noobs though, but you have to agree with me. There are a lot.

    #4: Add a sample map? A map can say more then a 1000 words.

    #5: Use header tags.


    Spelling [4/10]:

    Everybody makes mistakes, but tutorials should not have them, or at least not a lot.
    Here are a few of your simple mistakes, I could have missed some though, so read your whole trigger and check for spelling and grammar.

    #1:
    - Should be: 'successful'.

    #2:
    - Should be: 'disappeared'.

    #3:
    - Should be: 'resurrecting'.

    #4:
    - Should be: 'defense'. (2x)

    #5:
    - Should be: 'these'. (2x)

    #6:
    - Should be: 'similar'.

    #7:
    - Should be: 'explanations', 'timer window' (2x) and 'destroy' (2x).

    #8:
    - Should be: 'wrapped'.

    #9:
    - Should be: 'automatically'.

    #10:
    - Should be: 'because'.

    #11:
    - Should be: 'helpful'.


    Final Score:

    [5.5/10] + [3/10] + [3/5] + [4/10] = [15.5/35]
    15.5 / 35 = 0.4428
    0.4428 x 9 + 1 = 4.9852 (Out of 10.)
    A tutorial will need a minimal score of 8/10, for this reason I vote against approving at this tutorial.
    Fix what I told you and your score will go up for sure, your main problem is your main tutorial part followed by your spelling.

    Good Luck

    ~ Airandius

    P.S.
    My way of calculating for approval is not the way moderators will do it, I just made it as accurate as I thought I could, be aware that moderators only want good tutorials.
    Also: I'm not a mod, I can't approve this for you even if it scored 10/10.
     
    Last edited: Dec 28, 2008
  5. Pyritie

    Pyritie

    Joined:
    Nov 26, 2006
    Messages:
    11,357
    Resources:
    60
    Models:
    30
    Icons:
    9
    Packs:
    3
    Skins:
    12
    Tools:
    1
    Maps:
    1
    Tutorials:
    4
    Resources:
    60
    @Airandius: Tutorials have a score?
     
  6. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2



    What the hell is that?

     
  7. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Haha great feedback I'll work on this tomorrow if I get the time :thumbs_up:
    +Rep to you :grin:
    I will also put you on teh credits list if I remember :thumbs_up:
     
  8. Pyritie

    Pyritie

    Joined:
    Nov 26, 2006
    Messages:
    11,357
    Resources:
    60
    Models:
    30
    Icons:
    9
    Packs:
    3
    Skins:
    12
    Tools:
    1
    Maps:
    1
    Tutorials:
    4
    Resources:
    60
    They're tags you should use for your headers.

    Also, merge your posts. Double posting is against the rules.
     
  9. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    And what are headers? xD (Seriously I don't know squat about this site)
    And, yes, I will remove the first post. The first post was to get people to notice my tutorial. At that time I didn't know I could just Edit my post and post it again.
     
  10. Pyritie

    Pyritie

    Joined:
    Nov 26, 2006
    Messages:
    11,357
    Resources:
    60
    Models:
    30
    Icons:
    9
    Packs:
    3
    Skins:
    12
    Tools:
    1
    Maps:
    1
    Tutorials:
    4
    Resources:
    60

    h1



    h2



    h3




    Use them for titles for sections and stuff.
     
  11. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    I see... As I said before, I'll get to work on it tomorrow if I find the time for it.
     
  12. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    Nope, but it's fun to give scores so that the maker knows how good/bad his was. :p
    Lol, do I see a new smilie? :mwahaha:

    Anyway, the tutorial should be fixed a bit, good luck with it. ^^
     
  13. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Haha thanks for the luck.
    You're welcome any time to give this tutorial a score, it's just great feedback :thumbs_up:
    Now I'll get started with fixing all my faults and 'typos' :grin:
     
  14. Ash

    Ash

    Joined:
    Aug 27, 2005
    Messages:
    1,386
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    You get kudos for that, but that's about it.
     
  15. Staff SgT Legacy

    Staff SgT Legacy

    Joined:
    Feb 10, 2009
    Messages:
    10
    Resources:
    0
    Resources:
    0
    i mdidnt get the very idea of hero respawning
    i used ur way but still it wont works
    can som1 help?
     
  16. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    I'm always here to help.
    But perhaps you should start a topic on it in World Editor Help Zone instead since Hero Respawning isn't really related to the destruction of timer windows, right?
     
  17. Fisher Panda

    Fisher Panda

    Joined:
    Aug 3, 2009
    Messages:
    1
    Resources:
    0
    Resources:
    0
    Rep+

    Rep+ :thumbs_up:
     
  18. Xx Rome xX

    Xx Rome xX

    Joined:
    Sep 26, 2009
    Messages:
    51
    Resources:
    0
    Resources:
    0
    You missed a typo! At the bottom it says extream - should be extreme. :wink:
     
  19. Cheezeman

    Cheezeman

    Joined:
    Aug 19, 2008
    Messages:
    437
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Lol old thread.
    Thanks, it was written a while back and my English - though it's not perfect yet - has been improved since then.

    Topic should be closed.
     
  20. Arisato

    Arisato

    Joined:
    Dec 17, 2009
    Messages:
    991
    Resources:
    7
    Models:
    1
    Maps:
    4
    Spells:
    1
    Tutorials:
    1
    Resources:
    7
    Well im a noobie guy so, please! tell me, what is the array number i should have?

    please tell me hoho
    please tell me the arrays, i dunno much, still 2 months of making maps, thought i created 2 maps! i dunno how to use variables to much plzz tel meeee:cry::cry::cry::cry::cry::cry:
     
    Last edited by a moderator: Feb 7, 2010