Gate Ability

PooBucket

New Member
Reaction score
12
I've been trying to make this trigger work but it won't work. First time it worked alright but with many malfunctions, now it doesn't even work at all! :(Please help me with the trigger. (Also, how do you put the trigger in code format? I'm relatively new.) Here's the trigger.

Gate
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Gate
Actions
Unit Group - Pick every unit in (Units within 500.00 of (Position of (Casting unit)) matching ((((Triggering unit) is A structure) Equal to False) and ((((Triggering unit) is alive) Equal to True) and (((Triggering unit) belongs to an ally of (Owner of (Casting unit))) Equal to True)))) and do (Unit - Move (Picked unit) instantly to (Position of (Target unit of ability being cast)))
 

Atreyu

One Last Breath.
Reaction score
49
Your trigger should work if the...

Code:
[B](((Triggering unit)[/B] belongs to an ally of (Owner of (Casting unit))) Equal to True))))

Would be a matching unit. The only problem is leaks. You should use variables more often. Here is the complete trigger:

Code:
Test
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Gate
    Actions
        Set Caster = (Triggering unit)
        Set Caster_Pos = (Position of Caster)
        Set Target = (Target unit of ability being cast)
        Set Target_Pos = (Position of Target)
        Set Temp_Group = (Units within 500.00 of Caster_Pos matching (((Matching unit) belongs to an ally of (Owner of Caster)) Equal to True))
        Unit Group - Pick every unit in Temp_Group and do (Actions)
            Loop - Actions
                Set Temp_Picked = (Picked unit)
                Unit - Move Temp_Picked instantly to (Position of Target)
                Custom script:   call DestroyGroup(udg_Temp_Group)
                Custom script:   call RemoveLocation(udg_Caster_Pos)
                Custom script:   call RemoveLocation(udg_Target_Pos)

Refer to AceHart first. :D
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Here is the complete trigger

It should not destroy variables that are still in use...

"Caster" and "Target" are not needed.
However, "Position of Target" leaks a point.
 

PooBucket

New Member
Reaction score
12
I see. Thanks very much. I'm very horrible with variables so I don't use them often. That's why my map triggers leak a lot. xD.
 

PooBucket

New Member
Reaction score
12
Sorry, but two things. Where do I find "loop"? Sorry, I know it's a noob question for a person who does triggers.
 

PooBucket

New Member
Reaction score
12
(Sorry to reply late) It doesn't work properly, buildings move as well, as you saw my leaking code, I don't want structures to move, and the casting unit is a structure not a unit so I don't want that to move either. Units within range of the casting building do move but once at a time. :)
 

cleeezzz

The Undead Ranger.
Reaction score
268
it would be nice if you could post your current trigger so we can look at it :D

and use code tags xd
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> It doesn't work

Damn!
Then again, that explain neither what you did, what you tried, what happened or what should have happened instead.

> I don't want structures to move

Then don't pick them?


Either way, problems with triggers are best helped with by posting said triggers.
 

cleeezzz

The Undead Ranger.
Reaction score
268
same as atreyu's or yours
if its atreyu's, just add a condition in Set Temp_Group, if you look at the trigger you posted originally, you have a condition that checks if the unit is a structure or not, add that condition back into atreyu's code
 

wellwish3r

wishes wells.
Reaction score
52
I'm just wondering, isnt this just a Mass Teleport spell? If so why dont you just use the mass teleport spell, in that case you wouldn't have to trigger anything...
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
no it isnt
mass teleport targets a building not the ground

but there is a premade ability called dark summoning that does the same you want to trigger
 

wellwish3r

wishes wells.
Reaction score
52
no it isnt
mass teleport targets a building not the ground

but there is a premade ability called dark summoning that does the same you want to trigger

Dark Summoning moves the units that are in the area Dark Summoning is cast upon to the caster, not the selected point...

You could use mass teleport with dummies, create a dummy at the target, and at the casting unit, order te casting unit dumym to cast mass teleport on the dummy at the location...
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
you could create a dummy at target point and order it to cast dark summoning on the caster point
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top