Ok I don't know if this is valid or not but when you give a unit to a player does it retain it's old AI script even if you give it to an enemy player?
What I mean is why can't the damn Cannon that I give to the player attack? It works if it belongs to you but you gotta force attack due to the fact the Dark Archons are yours.
Here is the map for reference. I'm starting to use the no pylon trick for some tests and whatnot. Eventually I'll be able to enhance my maps with it

Note: This is more directed to Moose and Bolt as they are gods but any other of you mortals can help too!
ADDITION: Argh please help....
ok, I took a look at your map and here is what I think.
have you even seen a cloaked ghost? it won't attack because it's cloaked, unless you tell it to or tell it to hold position.
since building were never meant to be cloaked, they don't have hold position,
photon cannons have only two abilities:
1. stop
2. attack
and guess what, SC is programmed to tell cloaked units in stop mode not to attack enemies unless they get attacked by them.
so yuo won't be able to tell your cannons to attack when cloaked unless you create a mod that gives them the ability to hold position.
There's a flaw in that. Look at Cloaked Cannon Defense, it has cloaked cannons but they don't get attacked and yet they still attack. Is it just that my cannon isn't human controlled?
Your units won't attack eachother no matter what AI Scripts you use.
Obviously Sala you havent done all parts of the map. Another thing trooper you're very wrong about your cloaked unit behavior.
1)Get a ghost and cloak him, then get a ling to attack him. He will stay in 1 spot or run away and not shoot back.
2)Dark Templars attack anything in range and they are cloaked.
3)Cloaked buildings also attack if not attacked I just can't see why this computer isn't doing it.
The first 2 points I made proves your idea wrong trooper.
Did you jsut say dark templars aren't cloaked?
KaPs, we all knew what he meant.
I think the dark teomplar attacks because it is natural attribute of the unit to be cloaked the the ghost being cloaked is a property. the same thing happens when in melee, they made it so that the ghosts wont attack when cloaked so you can use stealth to nuke and wont attack random targets and give away their position.
So can anyone help me try to get the Cannon AFTER it is given to the computer player attack the Dark Archons?
So, is it possible to get a cloaked cannon that belongs to a computer to attack an unallied player?
If the cloaked cannon is unallied with the player you want it to attack.
It should attack no matter what.
I'll have to look at this map.
ADDITION:
Upon downloading and testing I have concluded.
What happened:
You enabled the doodad state for the pylon.
When you gave the cannon to p2, the doodad disabled.
I modified the map to show you how this happened.
On the map:
You can give back the cannon to p1, and then p2 again due to the added PRESERVE TRIGGER.
You can create a pylon for p2. To show you that when it is in possesion of p2, it is disabled, without a pylon.
What you can do, is make it enable the state after its given to p2.
Wait so you're saying that I have to re-enable doodad state for the cannon after player 2 gets it?
For the cannon to be able to shoot you must keep enabling doodad state for the cannon to work.
Ok I tried this a bunch of times and for some reason it's still not working. I re-disabled and re-enabled but it still won't fire >_< .
Always
Enable doodad state for all Protoss Photon Cannon at 'Cannon area' for all players.
If the cannon is cloaked, and given to a computer, it will NOT attack.
IF you are creating a unit, it will disable it again. Any time a unit is created.
Ok RexyRex cleared it up.

! I had a cool map coming up too.... Oh well thanks for the help...