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. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. 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] Upgrade Levels

Discussion in 'Triggers & Scripts' started by Landmine, Nov 13, 2009.

  1. Landmine

    Landmine

    Multimedia Manager

    Joined:
    May 20, 2008
    Messages:
    432
    Resources:
    0
    Resources:
    0
    I'm creating a map with an "infinite" amount of levels. After each level, an upgrade is researched for the enemy. The problem is that the upgrade level will not increase more then 1 when called.
    This works:
    • Player - Set the current research level of Upgrade 1 (A) to 1 for Player 7 (Green)

    This doesn't work:
    • Player - Set the current research level of Upgrade 1 (A) to 2 for Player 7 (Green)

    Upgrade 1 has 5 levels, but only 1 of them can ever get researched.
    I need a way to have it go for ~100 or so levels, so that I only need about 10 upgrades with 100 levels each. I currently have to make individual upgrades, and having them be researched once needed. This does create a lot of extras that are not needed. Any help is appreciated. Thanks in advance.
    For those who need to see the entire bit of the trigger involving this:
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Series_number Equal to 1
      • Then - Actions
        • Player - Set the current research level of Upgrade 1 (A) to 1 for Player 7 (Green)
        • Set Upgrade_level = (Upgrade_level + 1)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Series_number Equal to 2
      • Then - Actions
        • Player - Set the current research level of Upgrade 1 (B) to 1 for Player 7 (Green)
        • Set Upgrade_level = (Upgrade_level + 1)
      • Else - Actions

    Note that is the current way, and that it just repeats afterward (upgrade C-J or whatever).
     
  2. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,221
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    What kind of upgrades are they? Couldn't you just use triggers instead and fake an update?
    (So no real tech upgrading)
     
  3. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    Can't you just make it:

    Somebody buys an item (whatever system you have to upgrade).
    You then set upgradelevel = upgradelevel +1
    Set the current research level of Attack Upgrade to upgradelevel

    That should work. D:
     
  4. Landmine

    Landmine

    Multimedia Manager

    Joined:
    May 20, 2008
    Messages:
    432
    Resources:
    0
    Resources:
    0
    That doesn't work either. Level 1 works, but no others.
     
  5. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,804
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    You need to make the technologies have as many levels as you need in the object editor.

    You can not level technologies past their max level, both physically and using triggers.
     
  6. Airandius

    Airandius

    Joined:
    Jun 12, 2007
    Messages:
    1,238
    Resources:
    3
    Icons:
    1
    Maps:
    1
    Tutorials:
    1
    Resources:
    3
    Your reading skills are awesome jk. :p

    He already said that he changed that, but only the first level is working.
    Don't know what could be wrong though.
     
  7. Anachron

    Anachron

    Joined:
    Sep 9, 2007
    Messages:
    6,221
    Resources:
    66
    Icons:
    49
    Packs:
    2
    Tools:
    1
    Maps:
    3
    Spells:
    9
    Tutorials:
    1
    JASS:
    1
    Resources:
    66
    Maybe the level 2 doesn't have the effect anymore?
    That was basically my mistake in the first years of the 21th century.
     
  8. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,804
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Make sure that the upgrades effect has both the base (for first research) and incriment (for researches after the first).

    Otherwise how can you tell its not 5 but just giving the effect of 1.