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. The results are out! Check them out.
    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.

Buying abilitys

Discussion in 'Trigger (GUI) Editor Tutorials' started by Parrothead, Aug 8, 2007.

  1. Parrothead

    Parrothead

    Joined:
    Jun 10, 2007
    Messages:
    778
    Resources:
    10
    Maps:
    8
    Tutorials:
    2
    Resources:
    10
    Never played that RPG before so I really can't answer that.
     
  2. SpongejjBob

    SpongejjBob

    Joined:
    Jun 19, 2008
    Messages:
    18
    Resources:
    0
    Resources:
    0
    Thanks man, this tutorial is really helpful
     
  3. Velmarshal

    Velmarshal

    Joined:
    Mar 9, 2008
    Messages:
    1,517
    Resources:
    0
    Resources:
    0
    Just a typo, he wrote "abilitys" instead "abilities".
     
  4. Parrothead

    Parrothead

    Joined:
    Jun 10, 2007
    Messages:
    778
    Resources:
    10
    Maps:
    8
    Tutorials:
    2
    Resources:
    10
    Yes please fix that typo :).
     
  5. jongzky

    jongzky

    Joined:
    Nov 30, 2008
    Messages:
    6
    Resources:
    0
    Resources:
    0
    nah. all gui users can do this by themselves. I also did this in my map without any tutorials. I rate this 1/5. hha its so easy to make.
     
  6. Parrothead

    Parrothead

    Joined:
    Jun 10, 2007
    Messages:
    778
    Resources:
    10
    Maps:
    8
    Tutorials:
    2
    Resources:
    10
    Oh what a special little troll you are.

    EDIT: All right, how about you make your own tutorial telling how to do it?
     
    Last edited: Dec 18, 2008
  7. splashy5

    splashy5

    Joined:
    Jul 22, 2007
    Messages:
    259
    Resources:
    0
    Resources:
    0
    There is another way to do this with less effort..
     

    Attached Files:

  8. mnadeau1992

    mnadeau1992

    Joined:
    Feb 18, 2009
    Messages:
    45
    Resources:
    0
    Resources:
    0
    maibe

    yeah maibe, but in this way you gonna take a long while before seting 200 spells...:thumbs_down:

    i found better the tutorial methods:thumbs_up:
     
  9. .L.

    .L.

    Joined:
    Oct 26, 2008
    Messages:
    15
    Resources:
    0
    Resources:
    0
    Something is worng...

    Well, In this manner, If they bought 8 or more different abilities, then the other abilities wouldn't show up, Do you have a solution for this, like making ability limits. ex. Number of skill allowed : 4, or something like that. but overall 4/5
     
  10. Tirco

    Tirco

    Joined:
    Feb 7, 2009
    Messages:
    27
    Resources:
    0
    Resources:
    0
    wery nice and usefull! i did something like this, but i made you upgrade a skill =P
     
  11. Bwathke

    Bwathke

    Joined:
    May 22, 2009
    Messages:
    482
    Resources:
    0
    Resources:
    0
    I have played this on Battle.Net Diablo except if you drop the scroll you loose the spell but it dosent have to do that and I found a way to make the script work easily tell me if its buggy. Nice tutorial also.

    Reveal
    Unit - Paladin 0000 <gen> Acquires an item
    (Item-type of (Item being manipulated)) Equal to Scroll Of Healing
    Unit - Add Heal to (Triggering unit)
    But this is for a certain unit only but you can change that.
     
  12. dragor-X

    dragor-X

    Joined:
    Feb 26, 2008
    Messages:
    172
    Resources:
    0
    Resources:
    0
    Hmm your 2nd way is wrong, totaly wrong! Sorry to say that... There's just some errors and some variable problems, there we go: a fix
    (taken from my map (used your system and fixed the bugs))

    • Buy weapon Main
      • Events
        • Unit - A unit Acquires an item
      • Conditions
        • (Item-class of (Item being manipulated)) Equal to Artifact
      • Actions
        • Item - Make (Item being manipulated) Invulnerable
        • For each (Integer Integer01) from 0 to 1, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Item[Integer01] Equal to (Item-type of (Item being manipulated))
                • (Level of Skills[Integer01] for (Triggering unit)) Less than 1
              • Then - Actions
                • Game - Display to (All players matching ((Matching player) Equal to (Owner of (Triggering unit)))) the text: |cff00FF00Notice:|r...
                • Game - Display to (All players matching ((Matching player) Equal to (Owner of (Triggering unit)))) the text: (|cff00FF00Notice:|r + Description[Integer01])
                • Unit - Add Skills[Integer01] to (Triggering unit)
                • Custom script: exitwhen true
              • Else - Actions
                • Game - Display to (All players matching ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit)))) the text: |cff00FF00Notice:|r...


    EDIT: I even made a remove ability trigger, it's even easier to do than the add ability one:
    • Drop weapon Main
      • Events
        • Unit - A unit Loses an item
      • Conditions
        • (Item-class of (Item being manipulated)) Equal to Artifact
      • Actions
        • For each (Integer Integer01) from 0 to 1, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Item[Integer01] Equal to (Item-type of (Item being manipulated))
                • (Level of Skills[Integer01] for (Triggering unit)) Greater than or equal to 1
              • Then - Actions
                • Game - Display to (All players matching ((Matching player) Equal to (Owner of (Triggering unit)))) the text: |cff00FF00Notice:|r...
                • Unit - Remove Skills[Integer01] from (Triggering unit)
                • Custom script: exitwhen true
              • Else - Actions
                • Game - Display to (All players matching ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit)))) the text: |cff00FF00Notice:|r...


    And that's the trigger where the gold refound happens:
    • Return money
      • Events
        • Unit - A unit Pawns an item (to shop)
      • Conditions
      • Actions
        • For each (Integer Integer01) from 0 to 1, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Item[Integer01] Equal to (Item-type of (Sold Item))
                • (Level of Skills[Integer01] for (Triggering unit)) Greater than or equal to 1
              • Then - Actions
                • Game - Display to (All players matching ((Matching player) Equal to (Owner of (Triggering unit)))) the text: |cff00FF00Notice:|r...
                • Player - Add (Integer((Current life of (Sold Item)))) to (Owner of (Triggering unit)) Current gold
                • Hero - Drop (Sold Item) from (Triggering unit)
                • Item - Remove (Sold Item)
                • Custom script: exitwhen true
              • Else - Actions
                • Game - Display to (All players matching ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit)))) the text: <Empty String>


    :thumbs_up::thumbs_up::thumbs_up:
    :wink::wink::wink:
    :grin::grin::grin:

    If you put (Owner of (Trigger unit)) instead of the Integer01 then the array will be equal to the number of the player like player purple is player 4 so it'll add him the skill[4] but what if you only had 2 spells setted up like in your example and that instead of being the player red, you'd be player gray, then you won't have any spell added to your hero! :O credit me or rep me :thumbs_up:

    You should also add a fonction for people who want the ability removed when the hero removes the item or do an event like activating the spell from the item (thunder clap based without dmg, buff, stuff...).

    Edit please! Also edit your DEMO MAP and add credit if you put in my fix :O
    Else it's flawless! People should always use 2nd way because the 1rst way is way too long! (Open the Battle Mage map and you'll see how long is the spell trigger for buy ability)

    Edit: I personaly use the item HP as the cost recover cause I need it for my map but normally in your way of doing things it's better
     
    Last edited: Sep 11, 2009
  13. SteakedMeat

    SteakedMeat

    Joined:
    Jun 4, 2009
    Messages:
    70
    Resources:
    0
    Resources:
    0
    The first one was great! GOD JOB!!

    This helped me alot, i had a trigger before but i could only buy 1 ability and the nothing happened on rest + at max lvl i could still buy ability and loose lumber/gold so thx alot!
     
  14. orcyngiser

    orcyngiser

    Joined:
    Apr 9, 2010
    Messages:
    57
    Resources:
    0
    Resources:
    0
    useful. very useful.
     
  15. Provacateur

    Provacateur

    Joined:
    Oct 11, 2013
    Messages:
    29
    Resources:
    0
    Resources:
    0
    I really cant find
    (Level of skill[(Player number of (Owner of triggering unit))] for (Triggering unit)) Less than 1

    which is used in the trigger, what trigger do i start with to end with Level of skill?

    and i`ve also having a HUGE problem with the

    Set skill[(Player number of (Owner of triggering unit))] = Inferno

    I have made 2 inferno. 1 builded on the Item that cast inferno´s ( like in the guide )
    and one based on the spell that cast inferno´s..

    in the guide they refer to the item being used.... but when i try edit the trigger, it can only find the spell ( when using custom ).. but i did look in all items as well, no custumized item there eiter...

    So what am i doing wrong?
     
  16. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,532
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    @TO
    You should make your triggers more efficient so you don't mislead people.
    Also don't use waits or Integer A / B.
    You also leak player groups (force).
    Edit8: Engrish improved from 3 years ago: the tutorial is now better understandable :D.
    English not Engrish (I don't really care about spelling but i though you would like to know.
    Take a look at my tutorial Things a GUIer Should Know

    You should use triggering Player rather than owner of triggering unit.
    It is a player unit event which means that triggering player will catch the unit picks up item event.
    Check here.
    Code (vJASS):
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_PICKUP_ITEM )


    Note: Almost all of the Generic unit events in GUI will register a triggering player catch.
     
  17. Provacateur

    Provacateur

    Joined:
    Oct 11, 2013
    Messages:
    29
    Resources:
    0
    Resources:
    0
    Hi there, i'm trying to make custom spells following the guide here.
    it's not the first time i try, but i always find a wall in this sentence.
    (Item-type of (Item being manipulated)) Equal to Summon Infernal

    i can't find neither the summon infernal or the dark ritual.

    most times it look like this:
    (Item-type of (Item being manipulated)) Equal to Summon Infernal

    but nothing happen when people buy the stone.

    then i tried the dark ritual, to se if i could find the right source there..
    But the only time i can find Dark ritual is, with a much longer sentence.

    looking like this.

    Summon Infernal Equal to (Random level (Level of Dark Ritual for (Triggering unit)) Any Class item-type)

    pls help, its so frustrating, that i can't climb that wall.
     
  18. Razorburst

    Razorburst

    Joined:
    Jul 22, 2018
    Messages:
    8
    Resources:
    0
    Resources:
    0
    can you post an demomap to see the system in game??
     
  19. Razorburst

    Razorburst

    Joined:
    Jul 22, 2018
    Messages:
    8
    Resources:
    0
    Resources:
    0
    also how to put requirements for the bought of the ability? level of hero o whatever