[Solved]Movements with camera?

Started by zutokaza, April 07, 2017, 04:44:24 AM

Previous topic - Next topic
April 07, 2017, 04:44:24 AM Last Edit: April 07, 2017, 06:48:04 AM by zutokaza
I was trying to move the camera, but how do I move an entity without a name? Is it possible to create a name for the camera?

Code ( lua) Select
local straight = sol.movement.create("straight")
straight:set_angle(3)
straight:start(camera)
Solarus Works on ReactOS Opensource Windows OS

https://www.reactos.org/forum/viewtopic.php?f=2&t=14759&p=120616#p120616


Thank you Christopho! It works now.

Code ( lua) Select
local straight = sol.movement.create("straight")
straight:set_angle(3)
straight:start(map:get_camera())
Solarus Works on ReactOS Opensource Windows OS

https://www.reactos.org/forum/viewtopic.php?f=2&t=14759&p=120616#p120616