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 Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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.

Question about uploading GUI spells?

Discussion in 'Site Discussion' started by stan0033, May 14, 2016.

  1. stan0033

    stan0033

    Joined:
    Jun 27, 2010
    Messages:
    1,650
    Resources:
    15
    Models:
    4
    Icons:
    1
    Packs:
    1
    Skins:
    2
    Maps:
    6
    Spells:
    1
    Resources:
    15
    Is it allowed to use custom unit value as indexing for a spell?
     
  2. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,469
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
  3. neo_sluf

    neo_sluf

    Joined:
    Feb 5, 2012
    Messages:
    1,432
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Maybe not.

    I suggest to use UnitIndexer which is already given the link.

    It is more safer and cleaner than Custom Unit value.
     
  4. Dat-C3

    Dat-C3

    Joined:
    Mar 15, 2012
    Messages:
    2,469
    Resources:
    10
    Models:
    1
    Maps:
    5
    Spells:
    3
    Tutorials:
    1
    Resources:
    10
    They're the same thing. :thumbs_up:
     
  5. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,501
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    You can use the custom value of units as an indexing as long you aren't modifying them. Bribe made a spell template using this method here: Unit Indexer Spell Template.

    Unit indexers are the only submissions allowed in the spell section to modify a unit's custom value.

    Unit indexers directly modify the custom value of units. I'm not sure what you mean by this statement.
     
  6. neo_sluf

    neo_sluf

    Joined:
    Feb 5, 2012
    Messages:
    1,432
    Resources:
    5
    Maps:
    5
    Resources:
    5
    Oh I mean Unit Indexer is atleast much more safer in handling Custom Values and also it recycle the index which makes it clean.

    Am I wrong?
     
  7. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,501
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    You suggested that a unit indexer is more safer than using custom unit values.
     
  8. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Overriding the custom value without unit indexer is not allowed.

    If you want to use custom value, use the values the Unit Indexer provides
     
  9. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,731
    Resources:
    28
    Packs:
    1
    Maps:
    8
    Spells:
    17
    Tutorials:
    2
    Resources:
    28
    Simply put : Custom Values are not allowed, except to use alongside Unit Indexer (which means no "Set Unit Custom Value" in your triggers)
     
  10. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,628
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    This.

    Which is an really odd rule from my point of view.
    It's like saying you're now allowed to rob banks - unless you're using a gun to rob with.

    Semi-serious jokes aside, it'd generally be bad method to use custom value of unit anyway.
     
    Last edited: Jun 2, 2016
  11. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,185
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
  12. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,268
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    Is it using a proper grammar? With my current English knowledge, I can't even translate it correctly. It really sounds to me like, when you don't use unit indexer you may modify unit user data as you like, and vice versa.
     
  13. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,628
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    Sounds proper to me.
    It's phrased a bit differently than how the average person would write, but I don't think it's incorrect.
     
  14. Quilnez

    Quilnez

    Joined:
    Oct 12, 2011
    Messages:
    3,268
    Resources:
    37
    Icons:
    2
    Tools:
    1
    Maps:
    7
    Spells:
    21
    Tutorials:
    2
    JASS:
    4
    Resources:
    37
    Well, yeah maybe that was just me. After putting extra attentions I can finally comprehend it myself. Hm..
     
  15. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    yep, that's proper grammar.
     
  16. BloodDrunk

    BloodDrunk

    Joined:
    May 11, 2012
    Messages:
    1,963
    Resources:
    1
    Maps:
    1
    Resources:
    1
    A resource can/may not modify User Unit Data (Custom Value) under no circumstances, with the exception of Unit Indexing systems.

    Better now? "under no circumstances", there might be a better fitting word instead of "no", but this should be good.
     
  17. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,059
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Map makers can do what they want with UnitUserData (custom value). However, Spells/Systems need to not meddle with it due to cross-resource compatibility.

    Ie. Spell "A" set's caster's custom value to 7, spell "B" sets it to 42.

    The correct solution is to use a Unit Indexer as it uses a custom value that acts as an Array Index, so instead of "Unit - Set Custom Value to 7" you use "Set CustomIntegerArray[(Custom value of Unit)] = 7