Author Topic: [Solved]Movements with camera?  (Read 3894 times)

0 Members and 1 Guest are viewing this topic.

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
[Solved]Movements with camera?
« on: April 07, 2017, 04:44:24 AM »
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)
« Last Edit: April 07, 2017, 06:48:04 AM by zutokaza »

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
Re: Movements with camera?
« Reply #1 on: April 07, 2017, 06:17:55 AM »
Use map:get_camera()

zutokaza

  • Full Member
  • ***
  • Posts: 146
  • Active - Making stories can take the most time.
    • View Profile
(Solved)Movements with camera?
« Reply #2 on: April 07, 2017, 06:40:08 AM »
Thank you Christopho! It works now.

Code: ( lua) [Select]
local straight = sol.movement.create("straight")
straight:set_angle(3)
straight:start(map:get_camera())