HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need some trigger help

12-13-2003, 07:01 PM#1
Xzarol
I need to know how to take a unit that has just been ownership changed and give it back to the original owner. I am using this for a new concept- Commanders. I have a dummy spell that gives all of the AoS running units around the Commander of the Army to the current Commander. But unfourtunately this includes buildings. When the units are control transferred they get a set life of 180. So when the time runs out the buildings explode, which is really not good. So I tried to make a trigger that would instantly give back the buildings to the actual computer before the timed life set in. It looked something like this:

Trigger

Event-A unit changes owner.

Condition-Ownership changed unit is a structure equal to true

Action- Change ownership of ownership changed unit to player one red and and change color.

Please help. Thanks in advance!
12-13-2003, 08:02 PM#2
Ligature
why not build in a check to make sure the unit being changed isn't a structure before you change its owner?
12-13-2003, 08:30 PM#3
Xzarol
Let me explain... This is the trigger I use to change the units;

Trigger

Event- A unit begins casting an ability

Conditions- Ability being cast equal to (Call to arms Human)

Action- Select every unit in 1000 distance of triggering unit equal to owned by player one red and add to HumanCommanderGroup(Variable)
-Change ownership of picked units in HumanCommanderGroup to Human Commander (A player) and retain color.
Wait 4 seconds (This is where I hope to activate a trigger that will save the buildings from destruction)
-Add a timer to every unit in HummanCommanderGroup set to 180 timed life.

Thats the control trigger. Any suggestions on how to make this work?
12-13-2003, 11:48 PM#4
Xzarol
Won't anyone reply to help me? Im really stumped and I want this map out before christmas... Please...
12-14-2003, 04:05 AM#5
Xzarol
This is crazy. I posted this 6 hours ago and only one reply? Apparently people dont like helping me.... Could anyone PLEASE tell me how to fix this? Ill even throw in 10pts! Come ON!
12-14-2003, 04:16 AM#6
Ligature
So just make it "pick all units within 1000 of triggering unit matching conditions: matching unit owned by player 1 and matching unit is not a structure and add to HumanCommanderGroup(Variable)."

See what I mean?
12-14-2003, 04:46 AM#7
Xzarol
Hmmm.... Ill try that.