#How do I make a cutscene where the camera moves and dream blocks activate?

1 messages · Page 1 of 1 (latest)

hard sonnet
#

I just got into Lua (1 hour ago) and Im really bamboozled about cutscenes. How do I make so that the camera moves left and activates the dream blocks with the dream block string 2 song and after that the 2nd progression of oldsite beginning plays?

Would appreciate it

tight relic
hard sonnet
#

alright

tight relic
#

#code_modding message for second

#

(yes, i didn't get answer yet :p)

hard sonnet
#

ok

tight relic
#

honestly just put there Activate Dream Block trigger somewhere outside room, then find it with GetEntity and change it's .X

hard sonnet
#

alright

#

also

#

How can I make that the cutscene plays after destroying the lightning box

tight relic
tight relic
#

should ber very compicated i think...

#

or do

hard sonnet
#

damn

tight relic
#

or, put cutscene outside block (so player will touch it)

#

then getEntity the box

#

and check if it's deactivated (somehow..)

#

with while not <deactivated> coroutine.yield(nil) end

#

and after this loop put actual code for cutscene

hard sonnet
#

w h a t

tight relic
#

haha

#

i said "compicated"

#

well, not really

#

but not easy :p

hard sonnet
#

I just got into Lua 1 hour ago

tight relic
#

skill issue

#

should i make cutscene for you?

hard sonnet
#

that would be awesome

tight relic
#

(obv you will have to give me credits and $20)

hard sonnet
#

Also

#

Ignore the music progression

#

I found a better way to place it

tight relic
#

just saw it maddyS

#

hmm try this?

hard sonnet
#

I'll try

#

What that mean

tight relic
#

that line moves Activate Dreamblock trigger (assuming you placed it somewhere in room) to 0,0

#

with 4,0 being half tile offset

hard sonnet
#

so

#

when the box breaks it moves the trigger to the middle of the room?

tight relic
#

top left corner

#

oh no snip is typing

#

he will say that i havae 99999 errors in cutscene

#

just like last time

hard sonnet
#

probably

stoic snow
tight relic
#

oh look he didn't frogeline

stoic snow
#

functionally changes nothing, but makes it more readable

tight relic
#

but who cares about readability..? trollshiro
ok, do as snip says

stoic snow
#

that way the reader doesn't ask "what does 8 mean", and the variable name tells you what it is

stoic snow
#

so readability is somewhat important

hard sonnet
#

How do I build it in lönn so it works?

stoic snow
#

you kinda don't

hard sonnet
#

oh

stoic snow
#

you just save the file in Assets/YourUsername/YourCampaignName/yourCutscene.lua

hard sonnet
#

I did

stoic snow
#

and reference the file in your lua cutscene trigger

#

hover over the path property name for details

hard sonnet
#

I did

stoic snow
#

then just enter the cutscene trigger

#

if it doesnt cutscene, check your log.txt for details

hard sonnet
#

it doesnt :(

#

(02/10/2024 21:12:29) [Everest] [Error] [Lua Cutscenes] Failed to get entity: 'Celeste.LightningBreakerBox' is not trackable
(02/10/2024 21:12:29) [Everest] [Error] [Lua Cutscenes] Failed to resume coroutine

Detailed exception log:

System.Exception: [string "function onBegin()
..."]:3: attempt to index a nil value (local 'lightingBox')
at Celeste.Mod.LuaCoroutine.MoveNext() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Helpers/LuaCoroutine.cs:line 21
at Celeste.Mod.LuaCutscenes.LuaHelper.SafeMoveNext(LuaCoroutine enumerator)

stoic snow
#

@tight relic

tight relic
#

oh well

#

wellllllllll

#

why i expected something like this ._.

#

so my getEntity functions from DH are useful

#

awesome

tight relic
hard sonnet
#

true

tight relic
#

the only not incredible thing is that i have to close game and start doing stuff and it's 11pm

idle sandal
#

the getFirstEntity in the room:

stoic snow
#

me making a pr at 5 am:

tight relic
#

hm?

#

does it not use tracked?

idle sandal
#

getFirstEntity is like getEntity except it doesn't use the tracker

tight relic
#

._. lol what

idle sandal
#

same for getAllEntities vs getEntities

stoic snow
tight relic
#

@hard sonnet replace getEntity with getFirstEntity

tight relic
tight relic
#

yea

hard sonnet
#

Is that ya or nah?

tight relic
#

i think extend it a bit honestly

#

but should be fine

hard sonnet
tight relic
#

don't forget Activate db trigger

tight relic
#

oh wait!

#

this is activate trigger, right?

hard sonnet
#

yeah

#

left top

tight relic
#

uh wait uhh

stoic snow
#

idk, that looks like an
Ac
ti
va
te
Dr
ea
m
Bl
oc
ks

tight relic
#

i think you should make it room size, and put offroom

#

enough off room

#

so you will be veryvery sure player will not touch it

hard sonnet
#

Like that

tight relic
#

i think so

#

imo it would be better

hard sonnet
#

I place it under the room

#

(02/10/2024 21:24:08) [Everest] [Error] [Lua Cutscenes] Failed to resume coroutine

Detailed exception log:

System.Exception: [string "function onBegin()
..."]:3: attempt to compare number with nil
at Celeste.Mod.LuaCoroutine.MoveNext() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Helpers/LuaCoroutine.cs:line 21
at Celeste.Mod.LuaCutscenes.LuaHelper.SafeMoveNext(LuaCoroutine enumerator)

tight relic
#

khmm

#

let me recheck

#

ah yes

#

put local dzhake = require("#Celeste.Mod.DzhakeHelper.Utils").Lua at very start of file

#

and put GetPrivateMember(lightingBox, "health") instead of lightingBox.health

hard sonnet
#

Like that?

tight relic
#

and make sure you have DzhakeHelper

tight relic
#

#code_modding message cluelesseline

#

i do

#

rotation collab already uses it

hard sonnet
#

hold on

#

lemme install Dzhake helper

#

ok I installed Dzhake helper and have put it as a dependency

#

hold on gotta update everest

#

the fuck

#

why did my everest now crash

#

I wished Frost helper had more of these activator stuff

#

(02/10/2024 21:40:53) [Everest] [Error] [Lua Cutscenes] Failed to resume coroutine

Detailed exception log:

System.Exception: [string "local dzhake = require("#celeste.Mod.DzhakeHe..."]:4: attempt to compare number with nil
at Celeste.Mod.LuaCoroutine.MoveNext() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Helpers/LuaCoroutine.cs:line 28
at Celeste.Mod.LuaCutscenes.LuaHelper.SafeMoveNext(LuaCoroutine enumerator)

#

@tight relic

tight relic
#

ah ya

#

put this in mods folder

#

no wait

#

wtf

#

hmm..???

hard sonnet
#

?

tight relic
#

don't put it

#

try doing log(dzhake) at start of cutscenes, before while

hard sonnet
#

like that

#

?

tight relic
#

put newline after it

#

yeah

#

and run

#

oh wait

#

try also putting log("next line is 'dzhake'!!") before it

#

so we will understand when dzhake is logged

hard sonnet
#

Like that?

tight relic
#

yes

hard sonnet
#

ok

#

so

#

still nothing happened

tight relic
#

try restarting game

hard sonnet
#

nothing

tight relic
#

still same error?

#

what's in log after next line is 'dzhake'?

#

or it's not there?

hard sonnet
#

where tf did log go

#

(02/10/2024 21:51:06) [Everest] [Info] [Lua Cutscenes] next line is 'dzhake'!!
(02/10/2024 21:51:06) [Everest] [Info] [Lua Cutscenes] C# Type: Celeste.Mod.DzhakeHelper.Utils.Lua
(02/10/2024 21:51:06) [Everest] [Error] [Lua Cutscenes] Failed to resume coroutine

Detailed exception log:

System.Exception: [string "local dzhake = require("#celeste.Mod.DzhakeHe..."]:6: attempt to compare number with nil
at Celeste.Mod.LuaCoroutine.MoveNext() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Helpers/LuaCoroutine.cs:line 28
at Celeste.Mod.LuaCutscenes.LuaHelper.SafeMoveNext(LuaCoroutine enumerator)

#

ok mybe test is better

tight relic
#

so it is logged and it exists

hard sonnet
#

Is session.setFlag a lua thing?

tight relic
#

trigger trigger?

#

awful thing honestly

#

i think i found error

hard sonnet
#

?

tight relic
#

can you send cutscene?

hard sonnet
#

how do I write it like you did?

tight relic
#

ok whatever

#

replace GetEntity with dzhake.GetEntity

#

should work (?)

#

oh wait dlfgdjlfdsafksdjfasd

#

send cutscene pls

#

i'm a bit lost

hard sonnet
#

local dzhake = require("#celeste.Mod.DzhakeHelper.Utils").Lua
function onBegin()
log("next line is 'dzhake'!!")
log(dzhake)
local lightingBox = getFirstEntity("LightningBreakerBox")
while lightingBox.health > 0 do coroutine.yield(nil) end
-- box is broken

setCameraOffset(-2) -- input some number instead of -2
local trigger = getFirstEntity("ActivateDreamBlocksTrigger","Celeste.Mod.Entities.")
trigger.Position = vector2(0,0) -- puts trigger at top left corner. 8 is one tile.

end

function onEnd(room, wasSkipped)

end

#

Ok no

#

How do I send it like a code wall or smt

tight relic
#

```

#
local dzhake = require("⁠celeste.Mod.DzhakeHelper.Utils").Lua
function onBegin()
    log("next line is 'dzhake'!!")
    log(dzhake)
    local lightingBox = getFirstEntity("LightningBreakerBox")
    while lightingBox.health > 0 do coroutine.yield(nil) end
    -- box is broken

    setCameraOffset(-2) -- input some number instead of -2
    local trigger = getFirstEntity("ActivateDreamBlocksTrigger","Celeste.Mod.Entities.")
    trigger.Position = vector2(0,0) -- puts trigger at top left corner. 8 is one tile.
end

function onEnd(room, wasSkipped)

end
hard sonnet
#

huh

tight relic
#

instead of lightingBox.health put dzhake.GetPrivateMember(lightingBox, "health")

hard sonnet
#

(02/10/2024 22:00:35) [Everest] [Info] [Lua Cutscenes] next line is 'dzhake'!!
(02/10/2024 22:00:35) [Everest] [Info] [Lua Cutscenes] C# Type: Celeste.Mod.DzhakeHelper.Utils.Lua
(02/10/2024 22:00:35) [Everest] [Error] [Lua Cutscenes] Failed to resume coroutine

Detailed exception log:

System.Exception: [string "local dzhake = require("#celeste.Mod.DzhakeHe..."]:6: attempt to call a nil value (global 'GetPrivateMember')
at Celeste.Mod.LuaCoroutine.MoveNext() in /home/vsts/work/1/s/Celeste.Mod.mm/Mod/Helpers/LuaCoroutine.cs:line 28
at Celeste.Mod.LuaCutscenes.LuaHelper.SafeMoveNext(LuaCoroutine enumerator)

tight relic
#

you didn't forget dzhake., right?

hard sonnet
#

oops

tight relic
#

damn it's tomorrow

#

i really should go sleep

hard sonnet
#

No more errors

#

but not really working

#

I gotta sleep

tight relic
#

what's in log

hard sonnet
#

(02/10/2024 22:03:32) [Everest] [Info] [Lua Cutscenes] next line is 'dzhake'!!
(02/10/2024 22:03:32) [Everest] [Info] [Lua Cutscenes] C# Type: Celeste.Mod.DzhakeHelper.Utils.Lua

tight relic
#

no, after that..?

#

nothing?

hard sonnet
#

nah

tight relic
#

also remove those logs

hard sonnet
#

log s?

tight relic
#

log functions

#

just remove those lines

hard sonnet
#

nothing appeared in log

#

but it still doesnt work

tight relic
#

hhmmm

#

can you open console to view hitboxes?

#

can you see trigger's hitbox?

hard sonnet
#

Ye

tight relic
#

other trigger laugheline

#

click at bg

#

it may say something about "ActivateDreamBlocksTrigger" in top left thing

hard sonnet
#

Wait I dont have that maybe

#

its from CelesteTAS right?

tight relic
#

yea

#

but i thought you do

#

because i can see it

#

well uhh

#

goodnight

hard sonnet
#

no

#

gtg

tight relic
hard sonnet
hard sonnet
hard sonnet
#

I could use the activator triggers from frost helper

tight relic
#

sure

#

if you will manage to get it working

hard sonnet
#

It wont be a cutscene but I'll try when I have the motivation to get out of bed

#

Actually

#

I could try something

#

Prismatic helper cutscenes combined with activator triggers