Hero Swapping Command in DotA

Finestdeath

New Member
Reaction score
10
I was just wondering how does the -swap command in DotA works. Basically, when you type -swap, a list of possible heroes to swap with (heroes being used by players) is displayed. And when you type -swapx (x being the player number) and the other player accepts your swap request, your heroes instantly swaps with each other. Also, the items get transfered to the newly swapped hero. How would I go about doing it?
 

avalya

New Member
Reaction score
37
Just adding, minor but might be a difference, it's actually -swap X (X is not actually the player number, Blue is 1, Teal is 2, Purple is 3, Yellow is 4 and Orange is 5, whereas Pink is also 1, Gray is 2, Light Blue is 3 and so on, since it's 5 players per team, and the X actually stands for the player number of the team).

Basically, when both of the players agree on the swap, you change control of the heroes and drop the items, then give the items to the new hero.
 

jig7c

Stop reading me...-statement
Reaction score
123
its easy to do it.. just need alot time to do that... during map init you need to create 2 playergroups (one for each team)... and remove players from the group when someone leaves... then make a trigger so when a player types in -swap or -swap # it does changes alliance, transports all of heros' belonging to other base and again add/remove the player to each respective playergroup...
 

avalya

New Member
Reaction score
37
Not the switch command, but the swap one (changes heroes, not the player -- for example swaps Rogue Knight, Blue to Phantom Assassin, Purple, not swapping Blue to Grey). So it's much more simple than the switch command is.
 

Laiev

Hey Listen!!
Reaction score
188
Change owner line and pick every item in slot 1/2/3/4/5/6 and give to <new hero>.
 

Finestdeath

New Member
Reaction score
10
Woah, you just revived an old thread. Anyway, I already figured out how to do that based on the replies (and abit of thinking :D)
 

Laiev

Hey Listen!!
Reaction score
188
Woah, you just revived an old thread. Anyway, I already figured out how to do that based on the replies (and abit of thinking :D)

really sorry lol don't notice that >_< sorry sorry sorry :banghead::banghead::banghead::banghead::banghead::banghead::banghead:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top