Page 1 of 1

Making nice Cutscenes

Posted: Sun Jul 06, 2014 4:22 am
by marionline
Hey,
this timeit's not about battlesystem, I have questions on making cutscenes. ;)

First Question with regard to camera movement:
This lookes good, the hero is not displayed in the middle of screen, ...
Image

... now she is where heros usually are on screen.
This dosen't look good.
Image

:???:
I would not like to move the picture even more to the right.
The camera should follow the hero, just make the hero be more right on the screen, so the distance to the picture is greater.

I'm not quiet sure how to use a camera-movement plotscript to make the hero not walk in front of it's own eye.

1.Do I use pan camera (direction,distance,pixelstep) or put camera (x,y)?

1.2 The Hero is still moving and the camera should move as well.
Does the camera "auto-update"? Or after every walking comand for the hero, do I need to move the camera manually as well?

3. How wide is the camera radius?
The put camera refers "top left corner of the camera", so I need to know the distance between the "top left corner of the camera" and the hero. :(
The hero is usually in the middle of the screen.
I'd just need to change the center of the camera view by 3 tiles...

Help is greatly appriciated. :)

Posted: Sun Jul 06, 2014 4:46 am
by Bob the Hamster
I was about to say this camera trick is pretty difficult... and then I realized, no, maybe it isn't actually that bad. I have not tested it yet, but this script should do what you want.

Code: Select all

plotscript, camera beside hero example, begin
  variable(sl)
  sl := create container(0, 0)
  set parent(sl, get hero slice(0))
  camera follows slice(sl)
  move slice by(sl, 100, 0, 10)
  wait for slice(sl)
  
  # Do the rest of the cutscene here
  
  move slice by(sl, -100, 0, 10)
  wait for slice(sl)
  free slice(sl)
  camera follows hero(0)
end
This creates an invisible slice. It attaches the slice to the lead hero, and then makes the camera focus on the slice, rather than on the hero. Then the slice moves 100 pixels to the right. Because it is attached to the hero, it will move along with the hero.

And in answer to your question, the screen is 320 pixels wide, and 200 pixels tall. So to convert a map pixel position to a camera pixel position, just subtract 160 from the x and 100 from the y (but hopefully you won't need to bother with that because of "camera follows slice")

Posted: Sun Jul 06, 2014 5:30 am
by marionline
Oh wow! It's working! :D
You can even see then the camera is moving the 100 pixles!

I'll make good use of this script! :kamina: Hehehe...

Posted: Sun Jul 06, 2014 6:41 am
by TMC
For anyone else wondering, camera follows slice is an nightly command. I used exactly the same trick to have the hero not in the centre of the screen in Carcere Vicis.

Also, when converting between the coordinates of the top left of the screen and the hero coordinates you should add (150, 90) rather than (160, 100), taking into account the size of the hero sprite.