• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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