| 01-06-2006, 06:56 AM | #1 |
I made the Castle able to upgrade to the Arcane Observatory as a third upgrade. The problem is that the door on the observatory faces the wrong way(faces lower right instead of lower left). I need it to face an angle of 225. I tried a simple trigger to do this, but it did not work. Event- A unit begins construction Condition- (Triggering unit) is Bastion equal to True Action- Make (Triggering Unit) face 225 over 0.00 seconds Any ideas? |
| 01-06-2006, 09:14 AM | #2 |
You can't change it's facing if it has no movement. I would store the owner and position of the building in a variable, remove it, and create the upgraded one facing the right direction. |
| 01-06-2006, 02:05 PM | #3 |
I saw a report that if you cast polymorph on a building, then change the facing angle of the sheep, then dispel the buff it works. |
| 01-06-2006, 10:02 PM | #4 |
Well you have to understand that this takes place in a melee game, so I can't have model changes and crazy triggers. This seems to be a problem that many people have, so Vexorian could you perhaps write a JASS system that deals with this? |
| 01-06-2006, 10:22 PM | #5 |
i forget how, but i made a map tat allows youi to change the faceing of a building... ill look into finding it. |
| 01-06-2006, 10:29 PM | #6 |
It is simple, really. Make a trigger like this: Code:
Set Variable (MyPoint) = Position of (MyBuilding) Set Variable (Life) = Life of (MyBuilding) Set Variable(MyUnitType) = Unit type of (MyBuilding) Remove(MyBuilding) from the game. Create 1 (MyUnitType) Unit at (MyPoint) facing *wanted angle* degrees Set MyBuilding = Last Created Unit Set (MyBuildingLife) to (Life) custom script: call RemoveLocation(udg_MyPoint) Something like that, I don't think all function names are right, but you should get the point. |
| 01-07-2006, 02:06 AM | #8 | |
Quote:
|
| 01-07-2006, 03:21 AM | #9 |
Well, these would be fine if I wanted the player to have to do it. The way I have it set up, the Castle upgrades to a Arcane Observatory like a regular upgrade. I was trying to make it so as soon as the upgrade finished, it would rotate to 225. In other words, I need it to be automatic and multi-instance so no player commands are required. |
| 01-07-2006, 09:48 AM | #10 |
I think what earth-fury was trying to say, is that "Make unit face points over x.xx seconds" worked for him. You were trying to use "Make unit face angle over x.xx seconds". Try the former, by projecting a point away from the the position of the building (if you work out the sin/cos of the necessary angle and store it, it shouldn't require much processing) and order it to face that point. |
| 01-08-2006, 02:25 AM | #11 |
Arg I am having difficulty with this. How do I set a point at say, 100 units away from the origin on the 225 degree line, as soon as a building finishes construction? I don't want to have to make the player type any commands. Perhaps a JASS function that attaches a "caster" unit to a certain point once a town hall has been placed? (I use CS 12.8, so if that helps.) |
| 01-08-2006, 02:50 PM | #12 |
polar projections. :) |
| 01-09-2006, 02:59 AM | #13 |
polar wha? |
| 01-09-2006, 03:15 AM | #14 |
Trigger: Unit - Make (Triggering unit) face ((Position of (Triggering unit)) offset by 10.00 towards 90.00 degrees) over 0.00 seconds |
| 01-09-2006, 12:09 PM | #15 |
Event: Unit - A unit finishes construction Condition: (Unit-type of (Triggering Unit)) Equal to Bastion Action: Unit - Make (Triggering unit) face ((Position of (Triggering unit)) offset by (10.00,90.00)) over 0.00 seconds It's still not working, what am I doing wrong. |
