#Extremely basic 4 questions for Lönn

1185 messages · Page 2 of 2 (latest)

subtle sandal
#

You make a very convincing argument

wispy valve
wispy valve
#

We officially have 1000 messages here!

drifting talon
#

yeah

wispy valve
#

Is your status michi?

drifting talon
#

Yes

wispy valve
#

Niiice! :3

wispy valve
#

How are you

wispy valve
#

How do you make stuff move with objects like spikes on a Kevin

unique shore
#

There should be an ‘attach to solids’ option

drifting talon
#

(right click the entity)

wispy valve
unique shore
#

I doubt it, but there are moving dream blocks I think? Or ones on zip tracks from a helper somewhere.

wispy valve
#

Buh

wispy valve
#

Also

#

10 people in a single help thread

#

Yippee

wispy valve
#

Why does this keep disappearing from my followed tab

subtle sandal
#

no activity

wispy valve
#

I need more stupid questions..

#

OH YEAH HOW DO YOU MAKE CAMERA TRIGGERS WORK

subtle sandal
#

What do you mean?

#

They tend to just work

#

The difficult part is usually making them actually feel good/smooth while playing

#

But I may be wrong

subtle sandal
#

The two camera triggers I regularly use are "Camera Offset" and "Camera Target", and they do more or less what their name implies

unique shore
#

For camera target, lerp strength is how firmly it locks the camera to its node, direction is the gradual change until it reaches said lerp strength.

#

Camera offset is just overriding the rooms base offset

wispy valve
#

What about zoom

#

Also how do I make binoculars work

#

And also the ghost Madeline billboard thing

subtle sandal
wispy valve
#

Normal play and cutscene

subtle sandal
#

During cutscenes look into the lua cutscene documentation

#

Gimme a sec...

unique shore
#

You’ll want coroutine.yield(engine.Scene:ZoomTo(vector2(x_cordinate, y_cordinate), zoom_level, seconds_until_zoomed)

wispy valve
unique shore
#

Want an example from one of my own cutscenes?

subtle sandal
wary kayak
#

lua cutscenes doesn't have helpers for zooming, which is why you need the engine.Scene thing

subtle sandal
wispy valve
#

Ok wait let me explain what I want for the cutscene…

Camera moves right 5 blocks while zooming out for 5 seconds to about double then the usual view

wary kayak
wary kayak
wispy valve
#

Oh hello rain :D

wispy valve
subtle sandal
#

Loenn is pretty much just a new and improved version of Ahorn, plus a couple other changes

#

Note that this will look very weird very quick if the camera extends beyond the bounds of the room at any point

unique shore
wary kayak
#

...i am fairly sure that's not how that method works

#

like in several ways

unique shore
#

Really? Hold on let me check

wary kayak
#
  • position is screenspace not worldspace
  • you can't just zoom out, the target is only 320×180 and you need a helper to change that
  • unbalanced parens
unique shore
wary kayak
#

imagine a rectangle representing where the camera would be at 1× zoom. the top left of that is 0,0 in screenspace; and the bottom right is either 320,180 or 1920,1080 (i forget which)

#

also i understand this is a little hypocritical for me to say (i often send lua code without testing it), but i would advise you to test your lua code

unique shore
#

I honestly just copied word-for-word what works in my own cutscene

wary kayak
#

in that case you probably have a helper that's hooking that method and changing its behaviour; so your example will only be useful with the knowledge of what helper to use it with

unique shore
#

Here’s the same code the recipe book uses

-- zoom to a point
-- * position is a vector2 for where to zoom to
-- * zoom_amount is a number (how much to zoom)
-- * duration is a number (how many seconds the zoom should take)
-- because this uses coroutine.yield, your cutscene will only resume after the zoom is finished
coroutine.yield(engine.Scene:ZoomTo(position, zoom_amount, duration))

-- zoom out again
-- again, your cutscene will only resume after the zoom is finished
coroutine.yield(engine.Scene:ZoomBack(duration))

-- zoom instantly
engine.Scene:ZoomSnap(vector2(x_position, y_position), zoom_amount)
-- or
engine.Scene:ResetZoom()

-- zoom to a point, but from an already-zoomed-in state
-- works like ZoomTo, but cleanly transitions
coroutine.yield(engine.Scene:ZoomAcross(new_position, new_zoom_amount, duration))

wispy valve
#

Ho hoy gleebus

unique shore
#

You don’t need all of that, those are just separate examples of what you can do

wary kayak
unique shore
unique shore
#

rain, if you have an opinion on that?

wary kayak
#

will test on my machine...

unique shore
#

Should I send over the .lua I used?

wary kayak
#

that'd be nice :3

unique shore
#

As a .lua or a .txt?

wary kayak
#

either is fine

unique shore
wary kayak
#

...ok but that zooms in not out right

#

like, 1.5 ≠ 0.5

unique shore
#

Yes but using 0.5 zooms out perfectly fine

#

I can try recording it but I'd need a sec

wary kayak
#

as you can see, this does not zoom out, it just makes the gameplay target display smaller

wispy valve
#

Lmao

#

This is so entertaining

unique shore
#

That’s what I meant when I said zoom out lol

wary kayak
#

this room is bigger than 320×180. it's not a thing of rendering other rooms, it's that the camera is fundamentally limited to a 320×180 box in vanilla

unique shore
#

Oh, alr. The room I tested in was the minimum size. Sorry if I wasted your time with this

wary kayak
#

that's ok lol

sturdy crystal
#

if you come closer to the window, you can see through it just fine

#

if you walk further away, you start seeing the wall around the window

#

@unique shore

wispy valve
#

It’s a whole party here

#

Rain snip Alex and Hungary

subtle sandal
#

Long story short don't ever mess with camera zoom and your life will be significantly easier

wispy valve
wispy valve
#

Based off of what snip said

#

Or 0.5

#

If it doesn’t go to negatives

subtle sandal
#

Basically any number smaller than 1 will look stupid thumbeline

wispy valve
#

Yippee

wispy valve
#

Ok

#

I’m officially gonna try to cutscene

subtle sandal
#

gl

wispy valve
#

im so good at this fr (im stuck)

unique shore
#

You’ll want the path to your .lua from Assets to the file itself (excluding the .Lua extension).

wispy valve
#

wuh

#

I dodent gbet it

#

What.lua

unique shore
#

Hold on one sec

#

For ‘Filename’ you’ll want Assest/Modname/Yourname/cutscene

cutscene being your cutscene.lua file

#

Does that explain it or is that not what you’re asking?

wispy valve
#

All I’ve done is place the trigger

unique shore
#

Oh okay
Would you like me to explain/link how to make a cutscene with Lua?

wispy valve
#

Yes

wary kayak
unique shore
#

First thing you’ll want to do is make a file in Assets/Modname/Yourname/ named (Yourcutscene).lua. If you can edit that file with a text editor like notebook, great! If not make a .txt file

#

You’ll need to restart the game for Everest to notice the file.

wispy valve
#

How do I make a talk with badeline

wary kayak
wary kayak
unique shore
#

I don’t think you’ll need to install Lua itself though

wispy valve
#

Hm ok

wispy valve
#

Ok I read it all of this is Madeline talking and walking, how do I make badeline appear and talk with her

wispy valve
#

Lemme write a script

Move right 25 pixels
Camera offset right 25 pixels
Badeline appears
Madeline says “this is the place”
Wait 4 seconds
Badeline says “All this for an avocado?”
Wait 7 seconds
Madeline says “only the best for my deluxe breakfast”
Wait for 12 seconds
Badeline says “this place looks older than granny… it also seems dangerous”
For 24 seconds
Madeline says “it’ll be fine…”
For 5 seconds
Walk 5 pixels right
Offset camera left 5 pixels

subtle sandal
#

Uhh… you can probably right most of that in your English.txt

#

Like badeline appears and then just do dialog and then end?

#

(also make sure to remove badeline at the end of your cutscene)

unique shore
#

-- store the badeline entity outside the functions, so it can be accessed whenever necessary
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()
celeste.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("EXAMPLE_CUTSCENE_DIALOG_1")
badeline_vanishes()
end

function onEnd(room, wasSkipped)
if badeline then
badeline:RemoveSelf()
badeline = nil
end
enableMovement()
end

(This is from the recipe book)

wispy valve
subtle sandal
#

This is a cutscene I wrote that does something similar (with comments)

#

The first half of it is pretty specific to my cutscene, but what you're doing seems a bit like stuff from the line with "badeline = ..." to the end

#

Note that the vector2(x,y) is the (world I think?) position (in pixels) you want badeline to go to

wary kayak
#

yep world is correct. keep in mind you have access to eg. player.Center.X/Y if you want relative coords

subtle sandal
#

Oh I just always opened the debug menu and used that

wispy valve
#

I hate how I just immediately got lost in the world of cutscenes

#

Like wait so do I just type up the code in a thing then

#

Add the file to the Lua cutscenes trigger,

#

?

#

And then it works?

#

Why did snip leave the thread

wispy valve
#

Ok

#

And it’ll

#

Just work?

#

Simple as that?

#

Okie then

wary kayak
#

i mean if the code works, and you put it in a lua file, and you point the cutscene entity/trigger to that file, then it'll work

wispy valve
#

Ok then

#

Now I gotta just translate my code!

sturdy crystal
# wispy valve Why did snip leave the thread

there are dozens of #953393160464269402 threads that i am in, each of which i observe to be able to respond to updates as soon as possible. if a thread has the unread marker, this means that the user has provided an update and i should respond.
this thread has too much unimportant traction and always shows up as unread. this bothers me, so i left.

wispy valve
#

Can anyone in this thread

#

Draw

subtle sandal
#

no

wispy valve
#

Fair enough

wispy valve
#

How do you make song transitions sound good

#

Like if you go through a room transition can it jump back to the same point?

subtle sandal
#

If the song doesn’t change across a room transition then it shouldn’t jump

#

Other than that I’m not sure

drifting talon
#

Two rooms having the same song implies that the progress of the song should not change abruptly upon moving between them

wispy valve
#

No I mean 2 different songs like

#

The switch from checking in to scattered and lost

#

In celestial resort

unique shore
#

I think you’d want to add layers to your music for that (a good example is Forsaken City).

subtle sandal
#

This sounds right but I’ve never done this myself so I don’t know

signal slate
#

it worked !!!

#

ty

sturdy crystal
prisma glade
signal slate
#

oh shit mb