• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Teleport Hero with Command ?

Status
Not open for further replies.
Level 2
Joined
Oct 12, 2013
Messages
17
Hi guys. Please can anyone help me how to set teleport HERO trigger what will work with command ? for example me.. I will as player type -teleport and my hero will instantly teleport to Center of my specific region.

Sorry for my bad english >.< Im CZ / JP

thanks for all who want help me ^^ :wink:
 
Level 2
Joined
Oct 12, 2013
Messages
17
lx2v.JPG


:(( How to set global (all) "PLAYER" ? :/
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -teleport as A substring
      • Player - Player 2 (Blue) types a chat message containing -teleport as A substring
      • Player - Player 3 (Teal) types a chat message containing -teleport as A substring
      • Player - Player 4 (Purple) types a chat message containing -teleport as A substring
      • Player - Player 5 (Yellow) types a chat message containing -teleport as A substring
      • Player - Player 6 (Orange) types a chat message containing -teleport as A substring
      • Player - Player 7 (Green) types a chat message containing -teleport as A substring
      • Player - Player 8 (Pink) types a chat message containing -teleport as A substring
      • Player - Player 9 (Gray) types a chat message containing -teleport as A substring
      • Player - Player 10 (Light Blue) types a chat message containing -teleport as A substring
    • Conditions
    • Actions
      • Unit - Move YourHero instantly to YourRegion
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You ask us how to link YourHero with the triggering player ?
Here's the solution:

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to Event <gen> the event (Player - (Player((Integer A))) types a chat message containing -teleport as A substring)
  • Buy Hero From Tavern
    • Events
      • Unit - A unit Sells a unit
    • Conditions
    • Actions
      • Set YourHero[(Player number of (Owner of (Sold unit)))] = (Sold unit)
  • Event
    • Events
    • Conditions
    • Actions
      • Unit - Move YourHero[(Player number of (Triggering player))] instantly to YourLocation
I assume that Hero Selection in your map is chosen via Tavern, that the Hero is bought from the Tavern.

Inside the YourHero[], use the function Player - Player Number.
 
Status
Not open for further replies.
Top