• 🏆 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!

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