Page 1 of 1
Rotate buildings script?
Posted: 24 Mar 2007, 16:52
by udm
Hi, I wonder if it's possible to rotate buildings using LUA? Or is anyone currently making it possible? Thanks
Posted: 24 Mar 2007, 17:52
by Blah64
it is possible to rotate buildings, press '[' or ']' buttons
Posted: 28 Aug 2007, 11:42
by anterak
do you know the bind command to do this ?
Posted: 28 Aug 2007, 12:30
by zwzsg
I rotate factories with COB. But the yardmap doesn't follow
As for the bind commands:
From default uikeys.txt
Code: Select all
bind [ buildfacing inc
bind Shift+[ buildfacing inc
bind ] buildfacing dec
bind Shift+] buildfacing dec
From some mysterious hidden secret:
Code: Select all
bind numpad2 buildfacing south
bind numpad4 buildfacing west
bind numpad6 buildfacing east
bind numpad8 buildfacing north
Uhm, none of this is Lua, I'm irrelevant again.
Posted: 28 Aug 2007, 12:45
by anterak
thanks
Posted: 28 Aug 2007, 13:01
by trepan
Posted: 28 Aug 2007, 19:29
by KDR_11k
zwzsg wrote:I rotate factories with COB. But the yardmap doesn't follow

Even with set HEADING?
Posted: 29 Aug 2007, 01:07
by zwzsg
Yes, even with set HEADING, in 75b2.
Posted: 29 Aug 2007, 08:16
by KDR_11k
Can't Lua do something? If you could just tell Lineage mode to reparent the lineage to a new unit you could replace the com with one that faces wherever you want...
Posted: 29 Aug 2007, 08:29
by REVENGE
Just curious, why can't rotated yardmaps be autogen from the default one facing south?
Posted: 29 Aug 2007, 12:26
by KDR_11k
They are if you turn the thing before placing it but Zw is talking about the Kernel Panic commanders which are placed automatically by the engine.
Posted: 29 Aug 2007, 21:54
by zwzsg
Currently in Kernel Panic they do the "set HEADING", it doesn't turn the yardmap, but it turns the default exit waypoint (I prefer that to assigning a waypoint in a LUA widget). Strangely, the model turned, but not the buildpad. Had to make the script turn the buildpad piece again. Since the yardmap doesn't turn, the hole only turn 180°, while the kernel turns each 90°.
Last time we talked about turning building in Lua, Trepan seemed to say turning yardmaps in Lua wouldn't be that easy, so I didn't even try.
But, at least for Kernel Panic, turning the yardmap isn't as a priority as writing a better script to determine which cardinal point to turn, as currently it only takes into account the position relatively to other units, and it would be more helpful if it took into account the nearby slopes (which I can with just bos, I just need to decide which way do I do it and start typing it).
Posted: 30 Aug 2007, 01:22
by REVENGE
Wasn't there a time when each directional yardmap had to be premade and placed in the map file?
Posted: 30 Aug 2007, 11:59
by KDR_11k
Perhaps you could just lua a rotate button so when a user is unhappy with the rotation he ended up with he can change it?