Problem Solved
Turns out I didn't need to make a Function after all. All I had to do was use the Unit Construction Progress event and The Units warping in are now responding to the Ai's orders.
Also I Change the Title from Making a Modified Last Created Unit Function for Warp Gate to Warp Gate Unit Control because no function was needed.
--End of Edit --
So the Function idea I need help creating here is simple. I need to create a Last Created Units Function that works for Other Kind of Triggers that use Trigger Orders Commands to create units. This Function is begin created for the Warp Gate and returns the last unit that was created by the Warp Gate. The problem here is that the Last Created Unit function ignores units created by other triggers like this trigger below. My goal is to have a function that is able to return the warping in unit and ultimately put it in its own control group.
Trigger
Unit - Order SuperWarp to (Super Warp Gate - Warp In Zealot targeting (Random point in Target A)) (Replace Existing Orders)
Function :
Last Created Unit
Options: Function, Native
Return Type: Unit
Parameters
Grammar Text: Last created unit
Hint Text: Returns the last unit created via a "Create Units" action. This function ignores units created by other triggers.
i dont fully get your request. you have a trigger that issues order the warpgate to train a unit? it should trigger the event unit trained, you can then assign a variable on this event?
i dont fully get your request. you have a trigger that issues order the warpgate to train a unit? it should trigger the event unit trained, you can then assign a variable on this event?
I have a trigger that issues orders to the warpgate to warp in units in target areas of the map and I have no clue how to group these units and make them attack. Right now the units just stand there after being warped in. Also I tired using this Event and it does nothing for me.
Add (Unit) To Warp Drop Group
Events
Unit - SuperWarpGate creates a unit with ability Move or behavior No Game Link
Local Variables
Conditions
Actions
Unit Group - Add (Triggering unit) to Warp Drop Group
Do you need the building? You can just create a unit through the "create unit" trigger action and then add "last created unit" to unit group using what you already have.
The reason your trigger is not working is because your event is when the warpgate uses the "move" ability, which never will happen cause it's a building. Also, you'll need to use "created unit" instead of "triggering unit" for adding it to the unit group, because the triggering unit is the warp gate.
Do you need the building? You can just create a unit through the "create unit" trigger action and then add "last created unit" to unit group using what you already have.
The reason your trigger is not working is because your event is when the warpgate uses the "move" ability, which never will happen cause it's a building. Also, you'll need to use "created unit" instead of "triggering unit" for adding it to the unit group, because the triggering unit is the warp gate.
Yes, I need the Building. Plus its very important to use the building injunction with the Ai to warp in the units on the map.
I've Tried that Trigger out with both the ability and behaviors on all sides and still the units just stand there. I've even used the Warpable ability and even added it to the Warp Gate and still the units just stand there after being Warped in. Trigger is below.
Add (Unit) To Warp Drop Group
Events
Unit - SuperWarp creates a unit with ability Warpable or behavior No Game Link
Local Variables
Conditions
Actions
Unit Group - Add (Triggering unit) to Warp Drop Group
The triggering unit there is the superwarp unit. The event triggers when it creates a unit.
You could try checking the point at which the ability was used for a unit. Give me a bit to get my editor booted up, you on the mapster discord at all?
Figured it out, Thanks for the Help, you got me on the right track. Looks like I had to use (Triggering progress unit) construction progress is Completed.
Add (Unit) To Warp Drop Group
Events
Unit - (Triggering progress unit) construction progress is Completed
Local Variables
Conditions
(Owner of (Triggering progress unit)) == 2
Actions
Unit Group - Add (Triggering progress unit) to Warp Drop Group
I tried going to that mapster discord, but the link always says the group doesnt exist anymore. Is there a link somewhere on sc2mapster or do I just search for it?
Problem Solved Turns out I didn't need to make a Function after all. All I had to do was use the Unit Construction Progress event and The Units warping in are now responding to the Ai's orders.
Also I Change the Title from Making a Modified Last Created Unit Function for Warp Gate to Warp Gate Unit Control because no function was needed.
--End of Edit--So the Function idea I need help creating here is simple. I need to create a Last Created Units Function that works for Other Kind of Triggers that use Trigger Orders Commands to create units. This Function is begin created for the Warp Gate and returns the last unit that was created by the Warp Gate. The problem here is that the Last Created Unit function ignores units created by other triggers like this trigger below. My goal is to have a function that is able to return the warping in unit and ultimately put it in its own control group.
Trigger Unit - Order SuperWarp to (Super Warp Gate - Warp In Zealot targeting (Random point in Target A)) (Replace Existing Orders)
Function : Last Created Unit
i dont fully get your request. you have a trigger that issues order the warpgate to train a unit? it should trigger the event unit trained, you can then assign a variable on this event?
I have a trigger that issues orders to the warpgate to warp in units in target areas of the map and I have no clue how to group these units and make them attack. Right now the units just stand there after being warped in. Also I tired using this Event and it does nothing for me.
Add (Unit) To Warp Drop Group
Do you need the building? You can just create a unit through the "create unit" trigger action and then add "last created unit" to unit group using what you already have.
The reason your trigger is not working is because your event is when the warpgate uses the "move" ability, which never will happen cause it's a building. Also, you'll need to use "created unit" instead of "triggering unit" for adding it to the unit group, because the triggering unit is the warp gate.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Yes, I need the Building. Plus its very important to use the building injunction with the Ai to warp in the units on the map.
I've Tried that Trigger out with both the ability and behaviors on all sides and still the units just stand there. I've even used the Warpable ability and even added it to the Warp Gate and still the units just stand there after being Warped in. Trigger is below.
Add (Unit) To Warp Drop Group
The triggering unit there is the superwarp unit. The event triggers when it creates a unit.
You could try checking the point at which the ability was used for a unit. Give me a bit to get my editor booted up, you on the mapster discord at all?
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Add the created unit the Warp drop group that's what's wrong.
created unit != last created unit use created unit
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Figured it out, Thanks for the Help, you got me on the right track. Looks like I had to use (Triggering progress unit) construction progress is Completed.
Add (Unit) To Warp Drop Group
I tried going to that mapster discord, but the link always says the group doesnt exist anymore. Is there a link somewhere on sc2mapster or do I just search for it?
Glad you fixed the issue!
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
https://discord.gg/pFEZxPj
That's a permanent link there
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)