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

zutokaza

  • Full Member
  • ***
  • Posts: 133
  • 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
  1. local straight = sol.movement.create("straight")
  2. straight:set_angle(3)
  3. straight:start(camera)
« Last Edit: April 07, 2017, 06:48:04 am by zutokaza »

Christopho

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

zutokaza

  • Full Member
  • ***
  • Posts: 133
  • 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
  1. local straight = sol.movement.create("straight")
  2. straight:set_angle(3)
  3. straight:start(map:get_camera())