- Joined
- May 16, 2004
- Messages
- 76
I have been trying to create a trigger that generates a square shaped animal enclosure (from doodad fences). The reason why doodad fences are used, is the fact that the pathing map can be rotated to the angle that the fence faces. An enclosure of this type will be used to keep critters from wandering away and predators from getting in.
Now there are two types of fences that are used in generating the enclosure. Fence Vertical (Fence doodad rotated Vertically) and Fence Horizontal (Self Explanatory).
The enclosure is generated right after being built and I have attached a screenshot as to my problem. The left enclosure is one i constructed in the world editor ( it has perfect dimensions ). The right one is the resulting enclosure from my trigger. As you can see it is not quite a perfect square.
Here is the current trigger data i have made for this (not leakproof yet) and i am wondering as how would i fix it to make it a perfect square enclosure?
This may be a tough problem, all help is greatly appreciated.
Now there are two types of fences that are used in generating the enclosure. Fence Vertical (Fence doodad rotated Vertically) and Fence Horizontal (Self Explanatory).
The enclosure is generated right after being built and I have attached a screenshot as to my problem. The left enclosure is one i constructed in the world editor ( it has perfect dimensions ). The right one is the resulting enclosure from my trigger. As you can see it is not quite a perfect square.
Here is the current trigger data i have made for this (not leakproof yet) and i am wondering as how would i fix it to make it a perfect square enclosure?
-
Fence Construction
-
Events
- Unit - A unit Finishes construction
-
Conditions
- (Unit-type of (Constructed structure)) Equal to Livestock Pen [Actual]
-
Actions
- Set TempPlayer = (Owner of (Constructed structure))
- Set TempPoint = (Position of (Constructed structure))
- Set Point_FenceEnclosure = (TempPoint offset by 256.00 towards 90.00 degrees)
- Destructible - Create a Fence Horizontal at (Point_FenceEnclosure offset by 128.00 towards 180.00 degrees) facing (Random angle) with scale 1.00 and variation 0
- Destructible - Create a Fence Horizontal at (Point_FenceEnclosure offset by 128.00 towards 0.00 degrees) facing (Random angle) with scale 1.00 and variation 0
- Set Point_FenceEnclosure = (TempPoint offset by 256.00 towards 270.00 degrees)
- Destructible - Create a Fence Horizontal at (Point_FenceEnclosure offset by 128.00 towards 180.00 degrees) facing (Random angle) with scale 1.00 and variation 0
- Destructible - Create a Fence Horizontal at (Point_FenceEnclosure offset by 128.00 towards 0.00 degrees) facing (Random angle) with scale 1.00 and variation 0
- Set Point_FenceEnclosure = (TempPoint offset by 256.00 towards 0.00 degrees)
- Destructible - Create a Fence (Vertical) at (Point_FenceEnclosure offset by 128.00 towards 90.00 degrees) facing (Random angle) with scale 1.00 and variation 0
- Destructible - Create a Fence (Vertical) at (Point_FenceEnclosure offset by 128.00 towards 270.00 degrees) facing (Random angle) with scale 1.00 and variation 0
- Set Point_FenceEnclosure = (TempPoint offset by 256.00 towards 180.00 degrees)
- Destructible - Create a Fence (Vertical) at (Point_FenceEnclosure offset by 128.00 towards 90.00 degrees) facing (Random angle) with scale 1.00 and variation 0
- Destructible - Create a Fence (Vertical) at (Point_FenceEnclosure offset by 128.00 towards 270.00 degrees) facing (Random angle) with scale 1.00 and variation 0
-
Events
This may be a tough problem, all help is greatly appreciated.