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

Mass Teleport Allies

Status
Not open for further replies.
Level 13
Joined
Mar 28, 2010
Messages
844
Can someone please make a map to show me how to make the spell ''Mass Teleport'' teleport allies too? i tried to follow some other old threads instructions on this but i don't really know how to trigger very well or follow the instructions. I would very much appreciate the help <3
 
Level 38
Joined
Feb 27, 2007
Messages
4,951
Unfortunately, the base skill cannot be modified to also teleport allied units (no matter what you put in the targets field) without simultaneously breaking which targets you can successfully teleport TO. You have 3 options:
  1. Trigger the teleport yourself.
  2. Use something like ThisPOT's Teleport System V:2 to do the teleporting for you (but not sure that system explicitly supports teleporting allies too)
  3. Hackey workaround: spawn dummy units for allied players that also target the same unit as you do. Make a copy of your mass teleport skill with the following modifications, make a standardaized dummy caster unit if your map doesn't have one, then create the below trigger:
    • Set Data - Casting Delay to 0.00
    • Set mana cost to 0
    • Remove all art and effects
    • Make it a unit ability, not hero ability
  • Events
    • Unit - A unit starts the effect of an ability //doesn't fire until the channel completes
  • Conditions
    • (Ability being cast) equal to HERO_MT
  • Actions
    • Set TPoint = Position of (Triggering Unit)
    • Player Group - Pick every player in (All Players) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Then actions) else do (Else actions)
          • If - Conditions
            • ((Picked Player) is an Ally of (Owner of (Triggering Unit))) equal to true
          • Then - Actions
            • Unit - Create 1 DUMMY_CASTER for (Picked Player) at TPoint facing Default building facing
            • Unit - Add a 2.00 second generic expiration timer to (last created unit)
            • Unit - Add DUMMY_MT to (last created unit)
            • Unit - Set Level of DUMMY_MT for (last created unit) to (Level of HERO_MT for (Triggering Unit))
            • Unit - Order (last created unit) to Human Archmage - Mass Teleport (Target unit of ability being cast)
    • Custom script: call RemoveLocation(udg_TPoint) //change the name of the variable to match the name of your point variable, but keep the udg_ before it
 
Status
Not open for further replies.
Top