Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local actions = ActionList {
- -- open the door
- ChangeStateAction {
- --tag = "ENTER",
- entity = door,
- stateName = "DoorOpeningState"
- },
- Action {
- f = function()
- playerEntity:setComponentDisabled("CollisionComponent", true)
- Camera:unfollow()
- end
- },
- GoToAction {
- entity = playerEntity,
- destinationPos = enterDestinationPos,
- },
- -- don't forget to close the door, it's cold outside
- ChangeStateAction {
- entity = door,
- stateName = "DoorClosingState"
- },
- EffectAction {
- name = "FadeOutToBlack",
- popAfterFinish = false
- },
- Action {
- f = function()
- Camera:centerAround(teleportDestination) -- this sets camera to be in the room which player teleports into
- end
- },
- EffectAction {
- name = "FadeInFromBlack",
- popPrevious = true,
- waitForFinish = false
- },
- DialogueAction {
- dialogueTokens = {
- DialogueToken {
- talker = cat,
- text = { "bored" },
- portraitName = "sad"
- },
- DialogueToken {
- talker = cat,
- text = { "someone_coming" },
- portraitName = "idle",
- }
- }
- },
- Action {
- f = function()
- playerEntity:setCenter(insideCenterPos)
- playerEntity:setDisabled(false)
- playerEntity:setComponentDisabled("CollisionComponent", false)
- end
- },
- GoToAction {
- entity = playerEntity,
- destinationEntity = teleportDestination
- },
- DialogueAction {
- dialogueTokens = {
- DialogueToken {
- talker = cat,
- text = { "oh_its_you" },
- portraitName = "shrug"
- }
- }
- },
- Action {
- f = function()
- Camera:follow(playerEntity)
- end
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement