LUA Camera control

f1662208@

Chieftain
Joined
Mar 17, 2015
Messages
2
Hey there :)

I'm trying to make a mod that when certain events trigger, the camera will move and center on that event. For example, a capital city being taken would automatically center the camera on the city.

I have the event ready and triggering, but have no idea how to move the camera to said position.

http://modiki.civfanatics.com/index.php/Lua_Game_Events
I've tried some of the Camera commands but I've been unsuccessful so far

Any help is appreciated
Thanks!
 
Code:
UI.LookAt(pPlot, 0)

So to centre on the city stored in pCity
Code:
UI.LookAt(pCity:Plot(), 0)

The second parameter controls whether or not the camera zooms in on the plot as well, typically you should just set this to 0 and let the user zoom as they wish when they have arrived at the plot
 
Back
Top Bottom