Basics - StormPacer/How-to-Noodle Wiki

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

Tracks

Noodle tracks contain anything from Notes, Walls and even Environment objects. They are basically the core of Noodle Extensions. There are functions incorporated into my template called GiveNotesTrack and GiveWallsTrack, let's learn how to use them!

GivesNotesTrack("demoTrack", 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 bracket.

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

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 GiveWallsTrack instead of GiveNotesTrack. 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](/StormPacer/How-to-Noodle/wiki/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:

_customEvents.push({
    _time: 20,
    _type: "AnimateTrack",
    _data: {
        _track: "demoTrack",
        _duration: 10,
        _dissolve: [1, 0], [0, 1](/StormPacer/How-to-Noodle/wiki/1,-0],-[0,-1)
    }
})

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

_customEvents.push( { } ) is used by the script to say you want this text written under _customEvents in the main difficulty file (using fs for node.js).

_time is what tells it when the event will happen (in beats!)

_type tells it what customEvent this is, we defined it as AnimateTrack.

_data holds all of our precious stuff.

_track tells it which track you want it to affect, so every game object that will be defined under "demoTrack" 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 20th 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.

_customEvents.push({
    _time: 35,
    _type: "AssignPlayerToTrack",
    _data: {
        _track: "playerDemo"
    }
})

We have already learnt 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 "playerDemo".

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

USING EASING IS NOT RECOMMENDED 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.

_customEvents.push({
    _time: 15,
    _type: "AssignPathAnimation",
    _dat: {
        _track: "pathDemo",
        _dissolve: [0, 0], [1, 0.3](/StormPacer/How-to-Noodle/wiki/0,-0],-[1,-0.3)
    }
})

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 "pathDemo" 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.3, which is a bit before the player.

I recommend you continue with learning about functions now.