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. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  4. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    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] Tech-researched condition

Discussion in 'Triggers & Scripts' started by Yixx, Dec 29, 2008.

  1. Yixx

    Yixx

    Joined:
    Oct 12, 2008
    Messages:
    1,492
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Hi guys,,

    Straight to the point
    I need a condition to check if a tech is researched (Human - Defend)
    And i rather not make another trigger that sets true if researched,,

    Any ideas? Preferably in GUI,,

    Yixx,,
     
  2. D3zmodos

    D3zmodos

    Joined:
    Aug 9, 2008
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Unfortunately Yixx, as far as I know, there is not condition for checking directly if a tech is researched, however in some instances, you can check for the research's effects (for instance if it makes a passive ability available then make that ability place a buff on the "caster" and check for the buff).

    Now I may be wrong (I have a very limited knowledge of JASS but maybe somebody else could confirm this) but wouldnt it be possible to use "GetPlayerTechResearched" to check that? (Understanding of course that you wanted GUI).

    Hope this helps in some way :)
     
  3. Yixx

    Yixx

    Joined:
    Oct 12, 2008
    Messages:
    1,492
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Well,, it is about summoning some footmans, pushing units around you away,, so i thought they all put their shields in front,, but you need to have researched Defend before that is possible,,
    And i rather not (also) change anything in the normal Warcraft Abilitys,,
    Maybe any way to make the dummy unit always use the Defend animations? (like metamorphosis with ilidan does, it always uses alternative)
    Ill try something with that,, and get back on it later,,
    Tnx!!

    Required animation names: Defend
    Worked =D
    Tnx!!!!!!
     
  4. Clay_More

    Clay_More

    Joined:
    Dec 23, 2008
    Messages:
    23
    Resources:
    0
    Resources:
    0
    How about a simple Integer comparison as condition?

    (Current research level of Defend for (Triggering Player)) greater than 0
     
  5. Yixx

    Yixx

    Joined:
    Oct 12, 2008
    Messages:
    1,492
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Hmm,, could work too,, but i dont need the Tech anymore,, since they dont need to cast Defend anymore,, since they use only Defend animations,,
    (Good solution for any other problem that has no other solution then Tech researched though ;) , Clay_More )
     
  6. D3zmodos

    D3zmodos

    Joined:
    Aug 9, 2008
    Messages:
    66
    Resources:
    0
    Resources:
    0
    Well if all you need is an animation then you could use:
    • Animation - Unit Play <defend animation name here>


    Also if you want a technology researched cant you use the "Upgrades" tab in the same window as play properties to set it to be researched automatically?