Advertisement
Guest User

Untitled

a guest
May 30th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. //! New cutscene system for Syntensity
  2. //!
  3. //! This is a marker-based cutscene system for Syntensity, not needing any modifications in Javascript (unless you want your own actions or baseactions or anything else)
  4. //! It's composed of four basic entities, with possibility of baking new ones
  5. //! The entities are:
  6. //!
  7. //! 1) CutsceneController
  8. //! - this is a main controller for your cutscene. You can have more ones in map, handling different cutscenes (like, intro and outro)
  9. //! - you can connect controllers together, and then when one finishes, it'll skip to another. You can loop them.
  10. //! - controllers should have first tag in format "ctl_NUM" - i.e. ctl_0, ctl_1, don't skip the numbers.
  11. //! - it has properties:
  12. //! - canBeCancelled - specifies if you can cancel the cutscene. Boolean.
  13. //! - secondsPerMarker - specifies how long it'll take from one point to another; basically specifies speed. Float.
  14. //! - delayBefore - specifies delay before cutscene, in seconds. Float.
  15. //! - delayAfter - same as delayBefore, but after cutscene. Float.
  16. //! - nextController - number of controller you want your current controller connected to. If you don't want to connect it, keep -1 (or anything below 0). Connecting causes points not loop if you loop them (because when looped it can't skip to next controller) Integer.
  17. //! - factor - every subtitle time is multiplied by this - 4/3 by default, you propably don't want to modify this. Float.
  18. //! - beforeScene, afterScene - by default empty functions, ran before cutscene starts and after cutscene starts. Modifeable from JS in combination with getEntitiesByTag. You'll most likely want to use CutsceneAction entity described later.
  19. //! - started - not kept in entity, available just for game run-time, for changing cutscene state. Boolean.
  20. //!
  21. //! 2) CutscenePoint
  22. //! - this is a point in your cutscene. Cutscene goes from one point to another and creates its path like that. Point is linked to controller.
  23. //! - points should have first tag in format ctl_NUM_pnt_NUM2 (NUM is controller number, NUM2 is point number) i.e ctl_0_pnt_5. Don't skip numbers - begin with pnt_0,
  24. //! - through pnt_1 and pnt_2 to pnt_X.
  25. //! - it has properties:
  26. //! - nextPoint - next point entity it's linked to. It's strongly recommended that if you have pnt_1, you should link to pnt_2, otherwise it'll not work. (But for looping, you can of course link from last point to first again) Integer.
  27. //! - pointYaw - yaw of current point, used to do various angle changes when flying through cutscene. Float.
  28. //! - pointPitch - pitch of current point, used to do various angle changes too. Float.
  29. //!
  30. //! 3) CutsceneSubtitle
  31. //! - optional marker. Displays subtitles when running cutscene. Linked to point and controller.
  32. //! - subtitles should have first tag in format ctl_NUM_sub_NUM2, i.e. ctl_0_sub_4. Same with CutscenePoint, don't skip numbers. It won't work.
  33. //! - it has properties:
  34. //! - cutscenePoint - number of point it's linked to. i.e. for ctl_0_pnt_5, write 5. Integer.
  35. //! - subtitleStartTime - start time of subtitle, relative to its marker. (i.e. when marker starts at 15 seconds, and starttime is 2, it starts at 17 seconds) Float.
  36. //! - subtitleTotalTime - time that subtitle is shown. i.e. when it starts at 17 and totaltime is 3, it ends at 20. Float.
  37. //! - subtitleText - text of subtitle. String.
  38. //! - subtitleX - X coords of subtitle. Float.
  39. //! - subtitleY - Y coords of subtitle. Float.
  40. //! - subtitleSize - size of subtitle. Float.
  41. //! - subtitleColorR, G, B - red, green, blue amount of subtitle text color, from 0 to 255. Integers.
  42. //!
  43. //! 4) CutsceneBaseAction
  44. //! - optional marker. Allows to customize base action of cutscene, i.e. subtitle handling or background/subtitle image. Basically here just to bake your own ones.
  45. //! - it has two properties by default tho, backgroundImage and subtitleBackground, both are strings, you enter filename in format packages/meh.png.
  46. //! - first tag must be ctl_NUM_baseact, so it gets linked to controller. Itself it has no number, because there is just one baseaction allowed per controller.
  47. //!
  48. //! 5) CutsceneAction
  49. //! - by default it does nothing and is there as skeleton for baking custom actions ran in parallel with smoothaction (the one which moves from one marker to another)
  50. //! - useful for example when you want to render some models for controller or play music. It partially overlaps with beforeScene and afterScene functions in controller,
  51. //! - but beforeScene and afterScene is ran a bit earlier / later. For most of cases it doesn't matter tho - so use CutsceneAction where you can.
  52. //! - there is one cutsceneaction allowed per controller, but you can run more things in functions of entity - allowed are three functions, doStart, doExecute (ran every frame), doFinish.
  53. //! - first tag must be ctl_NUM_act.
  54. //!
  55. //! I think there is no need to describe more things. Just place some entities, link them properly and play with it, you'll learn how it works pretty soon.
  56. //! If needed, read the code.
  57. //! Good luck.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement