• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Mass Teleport Help

Status
Not open for further replies.
Level 22
Joined
Jun 23, 2007
Messages
3,242
NOTE: doesnt matter if spell is in gui/jass

ive been tinkering with a mass teleport spell. the spell is cast by a building, and the spell can teleport all units (controlled by the player) in a 500 radius to a friendly ground unit or building. however, mass teleport also teleports the caster, and the caster right now is the building. so whenever i cast the spell, the spell negates itself and dissapates.
can anyone help me make a spell thats mass teleport without teleporting the caster?
 
Level 7
Joined
Sep 5, 2006
Messages
333
I can help you.
Step 1. Make a dummy spell call mass teleport using target ground spell and set the cast range
2. make a trigger
event- when unit cast a spell
condition - spell being cast is (dummy spell)
action - move all unit is 500 range of caster unit to point of spell cast.


Done
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
There's an action:
Unit group - pick every unit and do action

There's also an action:
Unit - move unit instantly.

Combined, you make the action:
  • Unit Group - pick every unit within 500 of position of casting unit and do actions:
    • Unit - move picked unit to position of targeted spell
    • Special effect - create a special effect (mass teleport) at position of picked unit
    • Special effect - destroy last created special effect
    • Special effect - create a special effect (mass teleport) at position of targeted spell
    • Special effect - destroy last created special effect
Leaks 4 points and 1 group.
 
Level 22
Joined
Jun 23, 2007
Messages
3,242
im not stupid, then how am i supposed to use the trigger you wrote me if it doesnt exist?
ill give it a shot eleandor, thnx
EDIT: i tried out eleandor's method, and the spell only works once, the sfx doesnt show up for some reason (i only did the first sfx)
and it also teleports the building with it.
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
are you just stupid or what? I did not put it in trigger tag because it's not a trigger copy from world editer, it's a simply writen trigger not a copy from world editer one.
P.S Eleandor, leak can be fix easily by reading http://www.hiveworkshop.com/forums/f269/things-leak-35124/

I know. I wrote down my trigger without WE open and I didn't bother to fix the leaks in my post. I never bother to fix leaks in wehz unless asked because frankly, it's up to the original poster to fix them.
 
Level 19
Joined
Sep 4, 2007
Messages
2,826
Here it is! It performs well and doesn't leak. I've also attached the map just in case you don't want to waste your time.
  • Teleport
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to TeleportAnywhere!
    • 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)
 

Attachments

  • MassTeleportation!.w3x
    17.7 KB · Views: 86
Level 19
Joined
Sep 4, 2007
Messages
2,826
so if i just change the ability to blink, youll just have to explore the region first correcT?

The blink ability is used to teleport the user to that targeted location which means you won't be able to prevent the unit to blink away.
Perhaps you could get the units location before it teleports and instantly teleport it back. :D

Find this line:
  • Unit - Move (Picked unit) instantly to TempPoint2
And put this under it:
  • Unit - Move (Casting unit) instantly to TempPoint1
The trigger should look like this:
  • [TRIGGER]Teleport
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Blink
    • 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
          • Unit - Move (Casting unit) instantly to TempPoint1
          • 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
Aug 21, 2005
Messages
3,699
The blink ability is used to teleport the user to that targeted location which means you won't be able to prevent the unit to blink away.
Perhaps you could get the units location before it teleports and instantly teleport it back. :D

Set the casting range to 99999.99 and the actual minimum range = maximum range = 0,01; then the caster will virtually remain at the same position.
 
Level 22
Joined
Jun 23, 2007
Messages
3,242
i just need units around it to be teleported, not the building itself.
and it would be kinda unfair for the race if they can teleport anywhere on the map whenever they want to :/
yes, blinking doesnt work, since "caster movement is disabled"
 
Status
Not open for further replies.
Top