eliasdaler

Action list progress

Jun 28th, 2016
406
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local actions = ActionList {
  2.     -- open the door
  3.     ChangeStateAction {
  4.         --tag = "ENTER",
  5.         entity = door,
  6.         stateName = "DoorOpeningState"
  7.     },
  8.     Action {
  9.         f = function()
  10.             playerEntity:setComponentDisabled("CollisionComponent", true)
  11.             Camera:unfollow()
  12.         end
  13.     },
  14.     GoToAction {
  15.         entity = playerEntity,
  16.         destinationPos = enterDestinationPos,
  17.     },
  18.     -- don't forget to close the door, it's cold outside
  19.     ChangeStateAction {
  20.         entity = door,
  21.         stateName = "DoorClosingState"
  22.     },
  23.     EffectAction {
  24.         name = "FadeOutToBlack",
  25.         popAfterFinish = false
  26.     },
  27.     Action {
  28.         f = function()
  29.             Camera:centerAround(teleportDestination) -- this sets camera to be in the room which player teleports into
  30.         end
  31.     },
  32.     EffectAction {
  33.         name = "FadeInFromBlack",
  34.         popPrevious = true,
  35.         waitForFinish = false
  36.     },
  37.     DialogueAction {
  38.         dialogueTokens = {
  39.             DialogueToken {
  40.                 talker = cat,
  41.                 text = { "bored" },
  42.                 portraitName = "sad"
  43.             },
  44.             DialogueToken {
  45.                 talker = cat,
  46.                 text = { "someone_coming" },
  47.                 portraitName = "idle",
  48.             }
  49.         }
  50.     },
  51.     Action {
  52.         f = function()
  53.             playerEntity:setCenter(insideCenterPos)
  54.             playerEntity:setDisabled(false)
  55.             playerEntity:setComponentDisabled("CollisionComponent", false)
  56.         end
  57.     },
  58.     GoToAction {
  59.         entity = playerEntity,
  60.         destinationEntity = teleportDestination
  61.     },
  62.     DialogueAction {
  63.         dialogueTokens = {
  64.             DialogueToken {
  65.                 talker = cat,
  66.                 text = { "oh_its_you" },
  67.                 portraitName = "shrug"
  68.             }
  69.         }
  70.     },
  71.     Action {
  72.         f = function()
  73.             Camera:follow(playerEntity)
  74.         end
  75.     }
  76. }
RAW Paste Data