• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Make player lose control over a unit

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
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?
 
Level 25
Joined
Sep 26, 2009
Messages
2,381
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
 
Status
Not open for further replies.
Top