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] Building selected through trigger cannot train/useability/research

Discussion in 'Triggers & Scripts' started by Rising Evil, Aug 15, 2008.

  1. Rising Evil

    Rising Evil

    Joined:
    Sep 24, 2004
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Trigger:
    • Event
    • Unit-A Unit Finished Casting an ability
    • Conditions
    • (Ability being cast) Equal to Upgrade
    • Actions
    • Selection - Select Upgrader[(Player number of (Owner of unit (castingunit)))] for (Owner of (Casting unit))
    Okay, so it works - it selects the unit. But, the unit cannot do anything - it doesn't even have the "Set Rally Point" icon. It was working earlier when I just had upgrades, but now it doesn't work at all. If I select the unit normally - it works just fine. Anyone have any idea whats wrong?
     
  2. PatruX

    PatruX

    Joined:
    May 21, 2006
    Messages:
    175
    Resources:
    1
    Tools:
    1
    Resources:
    1
    Sounds like a hard coded thing to me.
     
  3. Rising Evil

    Rising Evil

    Joined:
    Sep 24, 2004
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I should probably know what that is, but - meh.
    It sounds bad D:
     
  4. Numerion

    Numerion

    Joined:
    Jul 3, 2008
    Messages:
    644
    Resources:
    0
    Resources:
    0
    i think (if it is building) than
    event:unit finishes upgrade
    condition:what so you want
    action:your actions
     
  5. Rising Evil

    Rising Evil

    Joined:
    Sep 24, 2004
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    "Upgrade" is an ability, it supposed to select the building "Upgrader" - finishing an upgrade does something else.
     
  6. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    your Upgrader array is "from 1 to 12" or "from 0 to 11" ?
     
  7. Rising Evil

    Rising Evil

    Joined:
    Sep 24, 2004
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    The trigger works fine. The only problem is when it selects the unit, all the buttons on the UI are hidden. Selecting it normally, the buttons are there - but selecting through the trigger they are not. And it was working fine, I was adding upgrades to the unit, and after a certain one - they all disappeared. I removed the upgrade and put units or other upgrades, fewer - and it was still gone, now even other units that I tried to make to do the same thing won't work either.

    The array is Upgrader[12](Unit), though, I've only got 9 player slots right now. Not sure if its 0-11 or 1-12.
     
  8. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    you should check

    because if you've not 0-11, you've got a gap with the player's id
    when the player x finish casting "upgrade", you make him select the "upgrader" of the player x-1
    so if so, that's not a suprise to not have the UI button of an opponent unit
    do you see what i mean ?

    if the problem is this one, you just have to add "+1" after "(Player number of (Owner of unit (castingunit)))"
     
  9. Rising Evil

    Rising Evil

    Joined:
    Sep 24, 2004
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I can see that, but I don't think thats the problem. I tried switching the Upgrader[x] to Barracks 00xx <gen> (Default barracks - just to try and see if that changed anything). It still doesn't work. I'm pretty sure its not the trigger, I may have broken something in the map after putting 1 too many upgrades - I don't know. I may have to start over with a new map P: I'll probably check to see if the problem exists when I make a new map and use the similar function, and check my map initial triggers to see if there's anything odd.
     
  10. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    so i've no idea, i've tested, it works
    good luck
     
  11. Rising Evil

    Rising Evil

    Joined:
    Sep 24, 2004
    Messages:
    49
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Haha, thanks anyways. I tried again in a different map - and it worked. So I'm thinking something just went wrong in my map.. D:



    EDIT: Ha! I figured it out!~ I had my "Upgrade" Select Skill in a Spellbook. And apparently - WC3 Doesn't like that!~ Now I know >_> /meh
     
    Last edited: Aug 18, 2008