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

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
Hey I have this teleport ability which teleport units to any location on the map how ever I want a requirement where the location must be visible in order to teleport. but I have no idea how to do so :/

Any help would be much appreciated :D

  • Teleport
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Teleport
    • Actions
      • Set TempPoint = (Position of (Casting unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 500.00 of TempPoint matching (((Matching unit) is A structure) Equal to False)) and do (Actions)
        • Loop - Actions
          • Set TempPoint2 = (Position of (Picked unit))
          • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Set TempPoint2 = (Target point of ability being cast)
          • Unit - Move (Picked unit) instantly to TempPoint2
          • Custom script: call RemoveLocation(udg_TempPoint2)
          • Set TempPoint2 = (Position of (Picked unit))
          • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
I would also like to tell you that you're picking enemy units and dead units as well! I don't know if that's intentional, if not, you shall add conditions other than "Matching unit is not a structure" which are "((Matching unit) is alive Equal to True" and "Owner of (Matching unit) Equal to (Owner of (Triggering unit))". That will teleport units owned by the caster that are alive.
 
Status
Not open for further replies.
Top