Jevk Basics - NoodleExtensionsCommunity/How-to-Noodle GitHub Wiki

Welcome to the first part of the tutorial. Here I'll teach you how to use noodle events with the Jevk's JavaScript template. But before move to that, you need to know what a track is.

Tracks

Noodle tracks aren't physical objects the player or anything for that matter can interact with. They are just a property of an object (like _cutDirection on notes). When we put a track on an object, we can animate that track with anything from this list (Except for things exclusive to chroma and/or AssignPathAnimation). The track animation will affect every object that has that exact track. There are functions incorporated into my template called noteTrack and wallTrack, let's learn how to use them!

noteTrack("foo", 20, 30)

This is an example of it, let's look at the parts.

First off we need to call the function by writing it's name in the script, that is the part before the parenthesis.

We then tell the function what the track from our notes should be called, we just called it "foo" here. YOU NEED THE QUOTES!

And the last two numbers tell the script we want all the notes between beat 20 and 30 to be affect by this.

And there you have it, this is the easiest way you can assign tracks to notes, the walls are the same, you just need to write wallTrack instead of noteTrack. Let's look at how the tracks can be used, but before that we need to learn what animation time is!

Animation Time

There is always another value at the end of every animation. That value is time and it can range from 0 to 1. 0 meaning 0% and 1 meaning 100%. NEVER GO OVER 1 IN ANIMATIONS AS IT WILL NOT WORK!

So if we set our duration effect to be 20 beats long and we want to dissolve the track in 10 beats, we set the time in the animation from 0 to 0.5.

Don't confuse this time with the _time value though. The time I described is used in an animation like _dissolve as it's second value. For example:

_dissolve: [
    [1, 0],
    [0, 0.5]
]

the second value is time. You can look at this little cheat sheet to know where to put the time. I will be marking it with t.

_dissolve, _dissolveArrow, _interactable : [value, t]

_position, _definitePosition, _rotation, _localRotation, _scale : [x, y, z, t]

_color : [R, G, B, A, t]

Now we're fully ready to learn about the various animation methods!

AnimateTrack

Let's start with explaining what AnimateTrack even is. AnimateTrack basically tells the track what we want it do, so we "animate" it.

Let's look at an example of it:

new AnimateTrack(69, {
    _track: "foo",
    _duration: 10,
    _dissolve: [
        [1, 0],
        [0, 1]
    ]
});

I'll try to explain this part by part as best as I can.

new AnimateTrack() is used by the script to create a new AnimateTrack event. Everything after that are the parameters (time, data). So in the example above 69 means the animation time and everything after the comma is just the animation data.

_track tells it which track you want it to affect, so every game object that will be defined under "foo" will be affected by this.

_duration tells it how long the event will be happening for (also in beats!)

And for the last part, you can put any event you want in here. I chose _dissolve.

Now to explain what the whole thing actually does:

This AnimateTrack will happen on the 69th beat. It will affect the track named "demoTrack". The length of the effect will be 10 beats. And the effect will be a dissolve effect which will start completely visible and progress to fully dissolved in that alloted time.

AssignPlayerToTrack

This one is pretty straightforward. AssignPlayerToTrack tells the mod you want the player on a certain track. The track can already exist or not. It is suggested that you put the player on a separate track, rather than on the track with bloqs.

Let's look at an example of it.

new AssignPlayerToTrack(35, "playerTrack");

We have already learned what most of the stuff does, so I'll just explain why there is so little data.

Basically we are just saying on which track the player will be put on, we don't tell it which animation the player will do. This just tells the mod that on beat 35 it should put the player on the track called "playerTrack".

We can animate the track however we want but only certain effects will affect the player. Those being _position, _localRotation and _rotation.

USING EASINGS IS NOT RECOMMENDED FOR PLAYER TRACKS AS VR CAN BE VERY SICKENING IF THE MOVEMENT ISN'T LINEAR!

AssignPathAnimation

AssignPathAnimation tells the mod you want all the objects on this track to do a certain animation over their lifetime. Time in here is the objects lifetime, 0 representing when it spawns, 0.5 representing when it's by the player and 1 when it's fully destroyed.

Let's look at an example of it.

new AssignPathAnimation(15, {
    _track: "foo",
    _dissolve: [
        [0, 0],
        [1, 0.25]
    ]
});

I pretty much explained the gist of what this is, I'll just explain the effect.

What is happening in here is that every note that has the "foo" track and is after the 15th beat, will start dissolved and undissolve until it's a bit before the player. We can tell that because time 0 is when the note spawns (the note will be fully invisible EXCEPT THE ARROW!) and it's fully visible by time 0.25, which is a bit before the player.

AssignTrackParent

Parenting can be used to control multiple tracks with only one track. Parents can also be used to warp objects in a way where you normally couldn't.

new AssignTrackParent(0, [track1, track2, track3], "parent");

The parameters in the parenthesis are (time, children, parent).


You can now continue this guide with one of three topics

EVERY ANIMATION TYPE CAN BE FOUND HERE

You can check out wall mapping where you will learn how to make art maps using a script.

You can choose functions too if you want to learn how to make a code block that can later be called again with a single line of code but with custom values.

You can also choose to learn about how to use the node editor in chromapper if you don't think scripting is for you. (Not recommended)

Or lastly, if you want to, you can check out the environments if you want to incorporate chroma with the script.