when the keys are Just Pressed
This commit is contained in:
parent
1af694d72d
commit
c11bb668ba
@ -116,6 +116,7 @@ Current calls to functions include,
|
|||||||
| update | Elapsed frames | Gets called every frame (after the song starts) |
|
| update | Elapsed frames | Gets called every frame (after the song starts) |
|
||||||
| stepHit | Current Step | Gets called when ever a step hits (steps are in between beats, aka 4 steps are in a beat) |
|
| stepHit | Current Step | Gets called when ever a step hits (steps are in between beats, aka 4 steps are in a beat) |
|
||||||
| beatHit | Current Beat | Gets called when ever a beat hits |
|
| beatHit | Current Beat | Gets called when ever a beat hits |
|
||||||
|
| keyPressed | Key Pressed | Gets called when a key just got pressed (up, down, left, right, accept) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2832,6 +2832,13 @@ class PlayState extends MusicBeatState
|
|||||||
controls.UP_R,
|
controls.UP_R,
|
||||||
controls.RIGHT_R
|
controls.RIGHT_R
|
||||||
];
|
];
|
||||||
|
if (luaModchart != null){
|
||||||
|
if (controls.LEFT_P){luaModchart.executeState('keyPressed',["left"]);};
|
||||||
|
if (controls.DOWN_P){luaModchart.executeState('keyPressed',["down"]);};
|
||||||
|
if (controls.UP_P){luaModchart.executeState('keyPressed',["up"]);};
|
||||||
|
if (controls.RIGHT_P){luaModchart.executeState('keyPressed',["right"]);};
|
||||||
|
if (controls.ACCEPT_P){luaModchart.executeState('keyPressed',["accept"]);};
|
||||||
|
};
|
||||||
|
|
||||||
// Prevent player input if botplay is on
|
// Prevent player input if botplay is on
|
||||||
if(FlxG.save.data.botplay)
|
if(FlxG.save.data.botplay)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user