Page 1 of 1

question

Posted: 27 Nov 2009, 23:00
by bartvbl
Is it possible to turn a building using lua?
I want to try to angle solar collectors at the time they are built (which is just a single turn)
is there some callin that I can use for this?

Re: question

Posted: 28 Nov 2009, 00:24
by MidKnight
There is a widget in CA that turns your building to face the map center at game start. Perhaps take a look at that?

Re: question

Posted: 28 Nov 2009, 00:31
by Pressure Line
angle them how? If you just want to add some variation just use cob. get a randomnumber between 0 and 359,then do a "turn base around y-axis <1> * randomnumber now;" in Create().

Re: question

Posted: 28 Nov 2009, 01:58
by maackey
put the turn call in the oncreate() function with a speed of now.

Re: question

Posted: 28 Nov 2009, 09:17
by bartvbl
that should do. :-)
thanks!
Knipsel.JPG
(213.91 KiB) Downloaded 2 times