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.

[Trigger] Custom Increment in Stats

Discussion in 'Triggers & Scripts' started by moomoocow1314, Jun 11, 2009.

  1. Feroc1ty

    Feroc1ty

    Joined:
    Aug 9, 2008
    Messages:
    60
    Resources:
    0
    Resources:
    0
    Do the math.
     
  2. moomoocow1314

    moomoocow1314

    Joined:
    Dec 10, 2008
    Messages:
    59
    Resources:
    0
    Resources:
    0
    an actual unit? Meaning those "name: 0000 <gen>"? Or do you mean a string of the unit's name?

    Sorry, i really don't get it.
     
  3. Feroc1ty

    Feroc1ty

    Joined:
    Aug 9, 2008
    Messages:
    60
    Resources:
    0
    Resources:
    0
    Yes, the <gen> thing, or a variable to the unit.
     
  4. moomoocow1314

    moomoocow1314

    Joined:
    Dec 10, 2008
    Messages:
    59
    Resources:
    0
    Resources:
    0
    hmm, then i have another question.

    since I've never understood what exactly those <gen> things were for, I tend to get dumbfounded when people use them.

    correct me if I'm wrong, but the <gen> thing is only created when that unit is in a map initially, right?

    So, if, per se, I include this skill for a hero in an AoS style map, which means I have to purchase that hero, I would I know what is its "name: #### <gen>"?

    :con:

    EDIT: a variable to the unit means...? Setting a unit-type variable or something in the GUI trigger that equals to "my unit"?
     
  5. Feroc1ty

    Feroc1ty

    Joined:
    Aug 9, 2008
    Messages:
    60
    Resources:
    0
    Resources:
    0
    You'll have to have a trigger that checks when a unit is bought, than set that unit up with the damage struct.

    • asd
      • Events
        • Unit - A unit enters (Playable map area)
      • Conditions
        • ((Triggering unit) is A Hero) Equal to True
      • Actions
        • Custom script: local DamageBonus this = DamageBonus.create(GetTriggerUnit())
        • Custom script: call SetUnitUserData(GetTriggerUnit(),this)



    I just don't comprehend how you're going to make a competent AoS without any knowledge of triggering whatsoever.
     
  6. Reaper2008

    Reaper2008

    Joined:
    Jul 27, 2008
    Messages:
    1,117
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Ask us :grin:.

    Seriously though, why use binary? Being a european i'm more used to decimal, and it can be used easier generally, especially with a +5 to simplify it.
     
  7. moomoocow1314

    moomoocow1314

    Joined:
    Dec 10, 2008
    Messages:
    59
    Resources:
    0
    Resources:
    0
    lol i'm not making any.

    i'm just asking should it happen in the above event, how would i go about on it.
     
  8. Lord_BoNes

    Lord_BoNes

    Joined:
    Sep 5, 2007
    Messages:
    264
    Resources:
    0
    Resources:
    0
    As it was stated to me above, using abilities with 3 or less levels means that they can be optimised for loading doing it my original way increases map loading time (by approximately 50x to 100x faster). But, if you really don't care about loading times, then feel free to use decimal instead of binary :thumbs_up:
     
  9. Vulcano

    Vulcano

    Joined:
    Mar 8, 2009
    Messages:
    335
    Resources:
    1
    Maps:
    1
    Resources:
    1
    + rep for Ferocity, this tutorial should be in jass tutorial section !:thumbs_up:
     
  10. moomoocow1314

    moomoocow1314

    Joined:
    Dec 10, 2008
    Messages:
    59
    Resources:
    0
    Resources:
    0
    finally got it to work. thx!