diff --git a/README.md b/README.md index fed6148..7464f0f 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,8 @@ If you're looking for documentation, changelogs, or guides, you can find those o - An improved input system, similar to Quaver or Etterna, with less delays, less dropped inputs and other improvements. - **More information during gameplay** - While you're playing, we show you information about how you're doing, such as your accuracy, combo break count, notes per second, and your grade/rating. - - **Better key layouts** - - Instead of being forced to use WASD and the arrow keys, now you can play with DFJK! + - **Customizable keybinds** + - Instead of being forced to use WASD and the arrow keys, you can customize the keybinds to any keys you want! - **Replays** (in beta) - Have you ever gotten a crazy score but didn't record? The replay system solves that: it automatically saves a "replay" of your gameplay every time you complete a song, which you can play back inside of the game. - Replays just store information about what you're doing, they don't actually record the screen -- so they take up way less space on your disk than videos. diff --git a/docs/changelogs/index.md b/docs/changelogs/index.md index 30d502f..4d58d31 100644 --- a/docs/changelogs/index.md +++ b/docs/changelogs/index.md @@ -1,4 +1,6 @@ # Changelogs - [Latest](latest) (Contains changes that are not in a release yet) +- [1.5.1](1.5.1) +- [1.5.0](1.5.0) - [1.4.2 and before](changelog-pre) diff --git a/docs/modchart.md b/docs/modchart.md index 3dc8309..e1fae25 100644 --- a/docs/modchart.md +++ b/docs/modchart.md @@ -109,6 +109,30 @@ for i = 4, 7 do -- go to the center end ``` +Jumping Arrows Example +```lua +function stepHit (step) + if step == 1 then + setActorAccelerationY(100, 4) + end + if step == 3 then + setActorAccelerationY(100, 5) + end + if step == 5 then + setActorAccelerationY(100, 6) + end + if step == 7 then + setActorAccelerationY(100, 7) + end + for i=4,7 do + if getActorY(i) >= 100 then + setActorY(100, i) + setActorVelocityY(-100, i) + end + end +end +``` + ### Available Hooks @@ -376,10 +400,34 @@ Returns the angle for the sprite id Set's the x position for the sprite id +##### setActorAccelerationX(int x, string/int id) + +Sets the x acceleration for the sprite id + +##### setActorDragX(int x, string/int id) + +Sets the x drag for the sprite id + +##### setActorVelocityX(int x, string/int id) + +Sets the x velocity for the sprite id + ##### setActorY(int y, string/int id) Set's the y position for the sprite id +##### setActorAccelerationY(int y, string/int id) + +Sets the y acceleration for the sprite id + +##### setActorDragY(int y, string/int id) + +Sets the y drag for the sprite id + +##### setActorVelocityY(int y, string/int id) + +Sets the y velocity for the sprite id + ##### setActorAlpha(float alpha, string/int id) Set's the alpha for the sprite id diff --git a/source/ModchartState.hx b/source/ModchartState.hx index c5e3ca3..1203ea5 100644 --- a/source/ModchartState.hx +++ b/source/ModchartState.hx @@ -564,6 +564,18 @@ class ModchartState getActorByName(id).x = x; }); + Lua_helper.add_callback(lua,"setActorAccelerationX", function(x:Int,id:String) { + getActorByName(id).acceleration.x = x; + }); + + Lua_helper.add_callback(lua,"setActorDragX", function(x:Int,id:String) { + getActorByName(id).drag.x = x; + }); + + Lua_helper.add_callback(lua,"setActorVelocityX", function(x:Int,id:String) { + getActorByName(id).velocity.x = x; + }); + Lua_helper.add_callback(lua,"playActorAnimation", function(id:String,anim:String,force:Bool = false,reverse:Bool = false) { getActorByName(id).playAnim(anim, force, reverse); }); @@ -575,7 +587,19 @@ class ModchartState Lua_helper.add_callback(lua,"setActorY", function(y:Int,id:String) { getActorByName(id).y = y; }); - + + Lua_helper.add_callback(lua,"setActorAccelerationY", function(y:Int,id:String) { + getActorByName(id).acceleration.y = y; + }); + + Lua_helper.add_callback(lua,"setActorDragY", function(y:Int,id:String) { + getActorByName(id).drag.y = y; + }); + + Lua_helper.add_callback(lua,"setActorVelocityY", function(y:Int,id:String) { + getActorByName(id).velocity.y = y; + }); + Lua_helper.add_callback(lua,"setActorAngle", function(angle:Int,id:String) { getActorByName(id).angle = angle; });