• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Move the player hero

Status
Not open for further replies.
Level 5
Joined
Mar 7, 2024
Messages
82
Is there a way that when the event starts, all of the player's heroes will teleport to the selected location? The teams' civilians will not be teleported, my map has player 1 to player 6.
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
That doesn’t check player number and will move every hero that exists on the map (that doesn’t have Locust). If you want to filter out by player I would add an additional filter condition:
  • (Player number of (Owner of (Matching Unit))) less than or equal to 6
You could also do a loop over each player’s units but that’s more work and if this isn’t being done hundreds of times per second the difference won’t matter.
 
Level 5
Joined
Mar 7, 2024
Messages
82
That's easy enough

  • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions) // This is a boolean condition
    • Loop - Actions
      • Unit - Move (Picked unit) instantly to (Your Location)
Does this cause neutral hostile heroes to be teleported as well?
 
Level 5
Joined
Mar 7, 2024
Messages
82
That doesn’t check player number and will move every hero that exists on the map (that doesn’t have Locust). If you want to filter out by player I would add an additional filter condition:
  • (Player number of (Owner of (Matching Unit))) less than or equal to 6
You could also do a loop over each player’s units but that’s more work and if this isn’t being done hundreds of times per second the difference won’t matter.
The start event repeats every 200 seconds or so. All hero players will be teleported to the selected map, and the hero must have the item Kelen's Dagger of Escape. If the hero does not have that item, he will not be teleported, can you help me with this?
 
Level 32
Joined
Aug 29, 2012
Messages
1,476
Does this cause neutral hostile heroes to be teleported as well?

Yes, that would teleport all heroes in the map. You need to add the condition above if you want to filter out which heroes are teleported. As for the dagger, add in this boolean condition as well

  • ((Matching unit) has an item of type Kelen's Dagger of Escape) Equal to True
 
Status
Not open for further replies.
Top