Leather128 / LeatherEngine

Just a little engine I decided to make since nobody seemed to have true custom mod support.
GNU General Public License v3.0
70 stars 57 forks source link

Enhancement: Lua scriptable notes #90

Closed FloweyProgramer closed 2 years ago

FloweyProgramer commented 2 years ago

So I saw another enhancement to add health drain notes. But I feel as if that can be expanded. How about when you miss or hit a note it calls a Lua function with the type of the note being passed through as a string. For example, you could create notes that do nothing but set up a mod chart that recreates black sun's mechanic or something.

Leather128 commented 2 years ago

it already does have that tho

Leather128 commented 2 years ago

which are:

function playerOneSing(noteDirection, songPosition, arrowType)
      -- code goes here
end

function playerOneSingHeld(noteDirection, songPosition, arrowType)
      -- code goes here
end

function playerOneMiss(noteDirection, songPosition, arrow_Type)
      -- code goes here
end

function playerTwoSing(noteDirection, songPosition, arrowType)
      -- code goes here
end

function playerTwoSingHeld(noteDirection, songPosition, arrowType)
      -- code goes here
end

(keep in mind for playerTwoSing and playerTwoSingHeld you have to have commit 33529f2 (most recent as of posting this) or later for the arrow type to work in the player two functions)

also remember that noteDirection is the number (note data) of the note, aka (for 4k) left = 0, down = 1, up = 2, etc.

Leather128 commented 2 years ago

although in future, i will have notes that can be entirely coded in .lua (like in psych engine) but as of now that's not a feature (previous thing was with modcharts but yeah)

FloweyProgramer commented 2 years ago

Thats cool, honestly wish there was documentation for some of the things you added to the lua handler. Or if there is, where is it?

Leather128 commented 2 years ago

yea i need to make some docs for it since the docs that used to have it (old kade docs lol) aren't up anymore