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

Editing Mass Teleport spell

Status
Not open for further replies.
Level 3
Joined
Jan 30, 2009
Messages
26
Hello,

What I am trying to do is to have a building (using the web gate) and have it use the Mass Teleport spell. So when unit get near the the webgate, it will be able to teleport them just as the Archmage would.

However, it is not working I'm guessing this is because its a webgate and the spell says it will teleport the caster as well.

Is there anyone to change the spell or building so the building stays put but transports surrounding units anywhere on the map?

Any help would be greatly appreciated.
 
Level 11
Joined
May 31, 2008
Messages
698
Trigger it.
A unit casts an ability
Ability is teleport
Pick all units in 350 range of casting unit and move them to target of ability
Use variable for the point so you can get rid of the leak.
I can make the actual trigger for you if you didnt understand what i said >.<
 
Level 11
Joined
May 31, 2008
Messages
698
  • mass teleport
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Animate Dead
    • Actions
      • Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching (((Matching unit) is A structure) Not equal to (!=) True)) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Target point of ability being cast)
There, I hope you can copy that down in trigger editor. If you have any trouble just post again.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
The trigger posted above is pretty good, but you may want to change a few things to the trigger
Change "Animate Dead" to your teleporting spell.
With the current conditions in
  • Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching (((Matching unit) is A structure) Not equal to (!=) True)) and do (Actions)
it would pick units that might be dead or even enemy units of the structure. You may want to add more conditions to that action...
 
Level 3
Joined
Jan 30, 2009
Messages
26
I got the trigger in but the structure itself is also being teleported and bringing other nearby structures with it.

*EDIT*

Acutally I had the trigger wrong I had it set for equal to instead of Not equal to. I fixed it and now nothing happens. Here is the trigger I have:

Teleport
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Webgate Teleport
Actions
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching (((Triggering unit) is A structure) Not equal to True)) and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to (Target point of ability being cast)
 
Level 5
Joined
May 12, 2008
Messages
77
If you use this teleport lots of times the game will break down cause of memory leaks.

Therefor please do the following:



This will save the units and the points and destroy the information completly after it is not used any more. Else this Info would be kept the whole game long.

Sorry for the half german picture but the important parts are english
 
Level 3
Joined
Jan 30, 2009
Messages
26
If you use this teleport lots of times the game will break down cause of memory leaks.

Therefor please do the following:



This will save the units and the points and destroy the information completly after it is not used any more. Else this Info would be kept the whole game long.

Sorry for the half german picture but the important parts are english
Thanks for the help but I don't even understand what to do when its in english let alone german

{EDIT}
I got it working fine now I see I had the trigger wrong. Thanks for the help everyone!

What exactly is a memory leak? Will this trigger cause that much harm to my game?
 
Last edited by a moderator:
Level 11
Joined
May 31, 2008
Messages
698
btw when you use a thing that says pick all units matching condition you have to use matching unit not triggering unit in the actual condition
Unit Group - Pick every unit in (Units within 350.00 of (Position of (Triggering unit)) matching (((Triggering unit) is A structure) Not equal to True)) and do
Where it says matching (((Triggering unit) is A structure) change triggering unit to matching unit whenevr you do this.

And memory leaks are just when you create something like a point or a unit group or something and you dont remove it. You have to use custom script to get rid of leaks. Go to the things that leak thread to learn more. But know the things that DONT leak, such as integers, reals, etc.
 
Status
Not open for further replies.
Top