#lua jank

106 messages · Page 1 of 1 (latest)

civic brook
#

i would like to have a proper cutscene at the start of my map a la https://youtu.be/p0MdZZx4UIA?t=18861 using images instead of the ingame engine. im using a hd styleground from maddies helping hand and would love to make the cutscene skippable if possible, so preferably avoiding the theo crystal on a move block trick or whatever. is this doable?

Download link: https://gamebanana.com/mods/150759

TIMESTAMPS:

0:00 - Prologue
1:24 - Forsaken City: Start
2:48 - Forsaken City: Alleyway
4:53 - Forsaken City: Collectibles
5:59 - Forsaken City Dark-side: Start
7:40 - Forsaken City Dark-side: Back Alley
10:48 - Old Site: Start
12:23 - Old Site: Memory
13:18 - Old Site: Back Exit
15:08 - Old Sit...

▶ Play video
void tiger
#

with something like this you might need to resort to doing a c# cutscene and stealing a page from farewell's ending cutscene

civic brook
#

who would be the relevant person to ask about that

civic brook
void tiger
#

yea ik, its just that this is not something lua cutscenes would be designed to do

#

maybe someone in code modding or modding general would like to give it a stab idk

civic brook
#

been trying to work it out and its seeming like i could do it with lua

#

ive got the hd stylground working already

void tiger
#

well yes technically you can do it with lua

civic brook
#

i would just have to camera target madeline offscreen and have a teleport on flag trigger at the end

void tiger
#

its just that i have no familiarity with it and it's not really what it's designed to do

civic brook
#

yh 🐈

#

if it works it works i guess

void tiger
#

gl

gritty copper
#

i feel like lua cutscenes should work fine

#

just don't have it take away control, and have it move you to the end when skipped

#

i guess you'd also need to figure out how to make it end naturally if you fall to the end

#

unless lua cutscenes is set up to automatically end it properly when you switch rooms

civic brook
#

got around to tackling the lua

#

either i dont know how flags work or i dont know how vivhelper teleport trigger works 🦭

#

the dialog plays out correctly then doesnt teleport

vagrant shadow
#

Required flags sounds like it still needs the player to actually step in the trigger

civic brook
#

the player is inside the trigger already during the cutscene

vagrant shadow
#

Depending on how the trigger is written, that's not guaranteed to be enough

#

Most triggers activate on entry

civic brook
#

ill chuck in a jump() to get out and back in

#

(madeline is offscreen here anyways)

#

ok that activated the trigger but also crashed the game 🦭

#

System.Exception: TeleportTarget not found! This error usually means that no TeleportTarget exists in the room set in your Instant Teleport Trigger.

#

ah

#

yep that fixes it!!

#

is it possible to have it fade to black before teleporting

#

like screenwipe or smth

vagrant shadow
#

You could probably figure out how to do a wipe from the cutscene

#

Or maybe see if the teleport trigger supports it

civic brook
#

i could end cutscene on warp then just start another one 🤷

#

this is true

vagrant shadow
#

Yeah, that would save you from using a trigger

civic brook
#

absolute coordinates being global and not relative to the room?

vagrant shadow
#

I would assume so

civic brook
#

the command works but it does a screen transition which is messy with my hd styleground

vagrant shadow
#

Screen transition meaning it scrolls over?

civic brook
#

yeah

vagrant shadow
#

Can you show the exact command you used?

civic brook
#

stays on screen til the transition is complete then disappears instantly

#

instantTeleportTo(136,120,a01,none)

vagrant shadow
#

You need the room name in quotes

#

Also just leave the intro type out if you don't need it. Don't put none, that's not a thing

civic brook
#

ok this is odd

#

cuts to black like its mid transition and stays there

vagrant shadow
#

What's the command now?

civic brook
#

instantTeleportTo(136,120,"a01")

#

hitting tilde tells me the teleport happened

vagrant shadow
#

Does tilde show the player position?

civic brook
#

actually

#

right room at least

#

dunno where madeline is

vagrant shadow
#

Cursor position I guess is helpful, but those coordinates seem a bit off

civic brook
#

i think the camera is still in the previous room?

#

(the room im teleporting from is directly below the one im teleporting to)

vagrant shadow
#

What if you try teleportTo and not instantTeleportTo

civic brook
#

instant teleport as intended

#

still no screenwipe but ill mess around with that fourth parameter see if that gets me anywhere

vagrant shadow
#

I think the fourth parameter is for like a walk-in entry or something, I suspect it doesn't do screenwipe

#

Could be wrong though

civic brook
#

yeah entry type as in how a chapter starts i think

#

ok got it!!!!!!

#

alright next challenge talk to badeline

#

got microliths documentation here lets see if we can do it

#
local badeline = nil

local function badeline_appears(left_side)
  -- determine the position and flipping properties
  local pos_x, scale
  if left_side then
    pos_x = player.Position.X - 18
    scale = 1
  else
    pos_x = player.Position.X + 18
    scale = -1
  end
  local pos_y = player.Position.Y - 8

  -- create and add a new badeline dummy entity
  badeline = celeste.BadelineDummy(vector2(pos_x, pos_y))
  badeline.Sprite.Scale = vector2(scale, 1.0)
  getLevel():Add(badeline)

  -- play sound + effect
  getLevel().Displacement:AddBurst(badeline.Center, 0.5, 8, 32, 0.5)
  playSound("event:/char/badeline/maddy_split", badeline.Position)

  -- wait until the next frame so all that can take effect properly
  wait()
end

local function badeline_vanishes()
  -- tell the badeline entity to disappear
  badeline:Vanish()
  Input.Rumble(getEnum("Celeste.RumbleStrength", "Medium"), getEnum("Celeste.RumbleLength", "Medium"))
  -- clear the stored variable so the memory can be used for something else
  badeline = nil

  -- wait until the next frame
  wait()
end

function onBegin()
  disableMovement()
  badeline_appears()
  say("a01")
  badeline_vanishes()
  wait(2)
  badeline_appears()
  say("a01_2")
  badeline_vanishes()
end

function onEnd()
  enableMovement()
end
#

cant handle having badeline_appears() after badeline_vanishes() apparently

civic brook
#

still nothing

#

it plays the first bit of dialog here then ends the cutscene as if the second one wasnt there

#

also badeline stays there if i skip cutscene but thats a future problem

#

ok nvm real easy fix

#

lua jank

civic brook
#

Why did this get ✅ 'd I am still dealing with lua jank catplanet

#

The

  say("a01_2")
  badeline_vanishes()

Is being ignored here

civic brook
#

different issue the cutscene replays every time the room is reloaded can i disable that

void tiger
civic brook
#

See the thing is

#

That property is trigger on every room reload versus trigger every time I enter the trigger

void tiger
#

snip_confused i swear theres a property which just prevents loading the cutscene if it already played

civic brook
#

I turned my pc off now but I am pretty sure there's no property for it

#

Unless I'm dumb

thorny vapor
#

yeah there's a once per session option

#

was added 5 months ago

civic brook
#

Oh yeah that tracks my laptop is super behind on updates

thorny vapor
civic brook
civic brook
civic brook
#

still playing on every respawn catstare

thorny vapor
#

is your everest up to date

civic brook
#

almost certainly not

#

one moment

thorny vapor
#

step 0 of getting help with an issue is making sure all your stuff is up to date

civic brook
#

cluelesseline yeah ik

#

maybe if im lucky itll magically resolve my main issue too

#

ok yep updating everest made the cutscene work as intended

#

im still chopping off the end part tho so confirming thats a me issue

#

tried adding the chopped off part as a second cutscene right next to the first

#

just as a "close enough"

#

and the second one is not appearing