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.

Make player lose control over a unit

Discussion in 'World Editor Help Zone' started by usfshihy, Jul 3, 2015.

  1. usfshihy

    usfshihy

    Joined:
    May 26, 2012
    Messages:
    165
    Resources:
    2
    Maps:
    2
    Resources:
    2
    I want to make an action in which the player loses control over the unit however remains the owner, like for example how we lost control over Illidan in the Expansion campaign when he was closing the demonic portals. Can someone please help.

    +REP and credits for helpers!
     
  2. SAUS

    SAUS

    Joined:
    May 22, 2015
    Messages:
    1,050
    Resources:
    0
    Resources:
    0
    I don't know the full nature of that mission in the campaign, but you could potentially just put the unit on a different team that is allied to that player. This might not be best when there are lots of players that are not on teams (it would use a lot of players slots) or if you need to know which player the unit is owned by for something (like kills giving money). You could probably handle the owner problem with a hashtable, though.

    What exactly do you need to do with this functionality?
     
  3. Nichilus

    Nichilus

    Joined:
    Sep 26, 2009
    Messages:
    1,968
    Resources:
    0
    Resources:
    0
    Illidan does in fact change owner, he just retains the color of the previous one.
     
  4. usfshihy

    usfshihy

    Joined:
    May 26, 2012
    Messages:
    165
    Resources:
    2
    Maps:
    2
    Resources:
    2
    But when I select him,I can still see his portrait talk animation like I still own him.
     
  5. Nichilus

    Nichilus

    Joined:
    Sep 26, 2009
    Messages:
    1,968
    Resources:
    0
    Resources:
    0
    It's how the partnership between two players is set. This is from the map itself:
    • Player - Make AP01_Player treat P12_IllidanChanneling as an Neutral with shared vision
    • Player - For AP01_Player, turn Friendly spell targeting On toward P12_IllidanChanneling
    • Player - Make P12_IllidanChanneling treat AP01_Player as an Neutral with shared vision
    • ...
    • Player - Make P12_IllidanChanneling treat AP01_Player as an Ally with shared vision and full shared units
    • Player - For P12_IllidanChanneling, turn Help requests Off toward AP01_Player


    and when Illidan enters one of the circles this is part of what happens:
    • Unit - Move Illidan instantly to (Center of Dimensional Gate COP 01 <gen>), facing 170.00 degrees
    • Unit - Remove All buffs from Illidan
    • Unit - Change ownership of Illidan to Player 12 (Brown) and Retain color
    • Unit - Change color of Illidan to Green
     
  6. usfshihy

    usfshihy

    Joined:
    May 26, 2012
    Messages:
    165
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Thank you very much Nichilus!

    +REP!