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

Status
Not open for further replies.
Well, I edited the Mass Teleport so it can teleport 999 units in 650 range, I also removed the cooldowns and mana cost, and set the delay to 1 second.

  • Mass Recall
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Recall // this is not the Mass teleport
    • Actions
      • Set Recall_Point = (Target point of ability being cast)
      • Set Recall_CasterLoc = (Position of (Triggering unit))
      • Unit - Create 1 To Be Used As Dummy for (Owner of (Triggering unit)) at Recall_Point facing Default building facing degrees
      • Unit - Add Mass Recall Dummy to (Last created unit) //this is the targeted one
      • Set Recall_Dummy = (Last created unit)
      • Unit - Create 1 To Be Used As Dummy for (Owner of (Triggering unit)) at Recall_CasterLoc facing Default building facing degrees
      • Unit - Order Recall_Dummy to Human Archmage - Mass Teleport (Last created unit)
      • Unit - Add a 2.50 second Generic expiration timer to (Last created unit)
      • Unit - Add a 2.50 second Generic expiration timer to Recall_Dummy
      • Custom script: call RemoveLocation(udg_Recall_Point)
      • Custom script: call RemoveLocation(udg_Recall_CasterLoc)
But it doesn't work D:
What it supposed to do is to teleport every units in the target area to the caster. So if you will suggest Dark Summoning, it's maximum units is only 99.
 
Level 9
Joined
Oct 11, 2009
Messages
477
Or modify the spell like this which is much simpler than creating dummy units:



  • Modified Mass Teleport
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Recall
    • Actions
      • Set Caster_Point = (Position of (Casting unit))
      • Set Target_Point = (Target point of ability being cast)
      • Special Effect - Create a special effect attached to the foot of (Casting unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
      • Set Special_Effects[1] = (Last created special effect)
      • -------- ONE SECOND DELAY --------
      • Wait 1.00 game-time seconds
      • -------- AFTER ONE SECOND --------
      • Special Effect - Destroy Special_Effects[1]
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 650.00 of Caster_Point matching ((Owner of (Casting unit)) Equal to (Owner of (Matching unit)))) and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the foot of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Move (Picked unit) instantly to Target_Point
          • Special Effect - Create a special effect attached to the foot of (Picked unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_Caster_Point)
      • Custom script: call RemoveLocation(udg_Target_Point)
 
I know the use of shift ._., but may I ask, will it work or it will crash the game?


EDIT: Omg 2075th post

Well if only one click can save 20 or more min to create good leak less trigger, why not to try?

For example if you know that max units on map will be 200 set spell max to 225 or 250 :D


EDIT:
Well it don't crash game, it just don't work :D
Max unit will be 20

Try attached map, thy work!
Ofc I was lazy, so you must clear memory leaks and add your own units, special effect etc!
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Thunder Clap
  • Actions
    • Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Frog) and do (Actions)
      • Loop - Actions
        • Unit - Move (Picked unit) instantly to (Position of (Triggering unit))
About that wait thing, well instead of Wait make another trigger and use variables to count seconds! (Better but hard way)
Or just use that trigger above made by sephiroth1234
 

Attachments

  • sadsadsad.w3x
    23.2 KB · Views: 57
Last edited:
supertoinkz, I tried it and it initially didn't work. The problem was the fact that the dummies have locust. In your case, the problem was double, because, how can you a) target a unit that has locust? Even dummies can't do that and b) the unit that casts the ability has to have no locust attached to it, otherwise it stops the spell in the middle of the casting. You really don't need a second dummy by the way; you could either target the hero or, since Mass Teleport is a point-type target spell too, you could use a point through custom script. Here is the map:
View attachment Mass Teleport Custom.w3x

So, here is the shrinked version of your code:
  • Mass Recall
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Recall
    • Actions
      • Set Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Point facing Default building facing degrees
      • Unit - Add Mass Teleport to (Last created unit)
      • Custom script: call IssuePointOrder (GetLastCreatedUnit(), "massteleport", GetUnitX (GetTriggerUnit()), GetUnitY (GetTriggerUnit()))
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Point)
 
Status
Not open for further replies.
Top