[Answered] Unable to change unit orientation

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
Ed49601
Posts: 8
Joined: Sun Mar 08, 2020 4:32 pm

[Answered] Unable to change unit orientation

Post by Ed49601 »

While trying tying to create scenarios or editing current ones I cannot change orientation on any units. The function is grayed out.

User avatar
Randomizer
Posts: 1531
Joined: Sat Jun 28, 2008 8:31 pm

RE: Unable to change unit orientation

Post by Randomizer »

You can only change the orientation of facilities using the drop-down menu. For units/groups, set a course and run the scenario until they conform. Pause, reset the scenario time and then save.

-C
User avatar
michaelm75au
Posts: 12463
Joined: Sat May 05, 2001 8:00 am
Location: Melbourne, Australia

RE: Unable to change unit orientation

Post by michaelm75au »

During design, you can also use the Lua console to set the heading (current and desired) of other units
ScenEdit_SetUnit({name='AOE 421 Sagami', guid='004aa55d-d553-428d-a727-26853737c8f4',HEADING=190, DESIREDHEADING=190})
Michael
Ed49601
Posts: 8
Joined: Sun Mar 08, 2020 4:32 pm

RE: Unable to change unit orientation

Post by Ed49601 »

Thank you! Where may I find a listing of LUA commands?
thewood1
Posts: 10297
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Unable to change unit orientation

Post by thewood1 »

There is an entire section on Lua:

https://www.matrixgames.com/forums/tt.asp?forumid=1681

In the pinned threads there is a section for Lua resources. That will lead you to detailed lua documentation. I'll start the timer on someone coming in and saying its too disorganized to use, but it is all in there.

http://commandlua.github.io/

Best bet is to just ask in the lua section and someone will more than likely show you an example. It is a part of the unit descriptor labeled heading and I think you would use setunit. But better lua people than I can show you.
thewood1
Posts: 10297
Joined: Sun Nov 27, 2005 6:24 pm
Location: Boston

RE: Unable to change unit orientation

Post by thewood1 »

Here is an example. Just open the lua console and use this:

ScenEdit_SetUnit({side="United States", unitname="USS Test", heading=0})
Post Reply

Return to “Tech Support”