home

events :


game function :

⟁ change expect !function work in jula to :]


• on game loading ( before user interaction ) :

    function onGameInit() {
      // something here
    }
  

• after player interaction ( after the 'press to play' ):

    function onGameStart(longNotes=boolean) {
      // something here
}

• on every BPM Beat hit :

    function beatHit() {
      // something here
    }
  

• on every new chart step :

    function stepHit() {
      // something here
    }
  

• on player sick notes press :

    function onNotesHit(longNotes=boolean) {
      // something here
    }
  

• when the player miss a notes :

    function onMiss(longNotes=boolean) {
      // something here
    }
  

• when the opponent sick a notes :

    function onNotesOpponentHit() {
      // something here
    }
  

• is this can be possible ? :

    function onOpponentMiss() {
      // something here
    }
  

• every events played :

    function onEvents(data=[array]) {
      // something here
    }
  

can be use like this :


    function onEvents(data) {
      console.log("the events '"+data[0]+"' with in '"+data[1]+"' and '"+data[2]+"' have been played :D !")
    }
    
    // if your event is ["my events","test content1","test content2"]
    // output: "the events 'my events' with in 'test content1' and 'test content2' have been played :D !"
  


FMS/Funkin.mit script's :


FMS-playAnim

FMS_playAnim() can be used for play custom characters (dad, gf, bf) anim

FMS_playAnim(characterName="string",animName="string",isLooping="boolean");
  

exemple :

// play *player* *cheer* animation without looping it
FMS_playAnim("bf","cheer",false);

avansed exemple :

// play in loop *opponent* *sad* animation every time the player do a good notes hit
function onNotesHit(longNotes) {
  FMS_playAnim("dad","sad",true);
}
-- in jlua
function onNotesHit(longNotes)
  FMS_playAnim("dad","sad",true);
end

FMS-makeElement

FMS_makeElement() can be used for make elements like a boxe, square, circle... for a UI !

FMS_makeElement(id="element",x = 1,y = 1,z = 1,w = 100,h = 100,putIn = "default/GAME/GUI etc..")
  

exemple :


    FMS_makeElement("aBoxe",10,100,1,200,200,"GAME")
  

avansed exemple :


    let boxe = FMS_makeElement("aBoxe",10,100,1,200,200,"GAME");
    boxe.style.opacity = 0.5;
    boxe.onclick = function () {
      boxe.remove();
    }
  

    local boxe = FMS_makeElement("aBoxe",10,100,1,200,200,"GAME")
    boxe.style.opacity = 0.5
    boxe.onclick = function ()
      boxe.remove()
    end
  

FMS-makeText

FMS_makeText() can be used for make a simple Text !

FMS_makeText(id = "element",text = "Hello word !",x = 1,y = 1,z = 1,scale = 1,putIn = "default")
  

exemple :


    FMS_makeText("myText","Hello word !",1,1,2,1,"GUI")
  

avansed exemple :


    var text = FMS_makeText("myText","Hello word !",1,1,2,1,"GUI");
    var x = 1;
    
    setInterval((/* move the text at the right */) => {
      x++;  // add +1 every loop
      text.style.left = x+"px";
    },10) // 0.1 sec 
  

    local text = FMS_makeText("myText","Hello word !",1,1,2,1,"GUI");
    local x = 1;
    
    loop(function (--[[ move the text at the right ]]) 
      x++; --add +1 every loop
      text.style.left = x+"px";
    end,10) --0.1 sec
  

FMS-makeImage

FMS_makeImage() can be used for put image !

FMS_makeText(id = "element",scr = "path/to/my/images",x = 1,y = 1,z = 1,scale = 1,putIn = "default")
  

exemple :


    FMS_makeImage("myImages",game.imagesFolder+"/myImages.png",1,1,2,1,"GUI")
  

avansed exemple :


    var images = FMS_makeText("myText",game.imagesFolder+"/myImages.png",1,1,2,1,"GUI");
    
    // show the image every time the opponent note press
    function onNotesOpponentHit() {
      images.style.visibility = "visible";
      
      setTimeOut((/* wait 1 sec*/) => {
        images.style.visibility = "hidden";
      },1000) // 1 sec
    }
  

    local images = FMS_makeText("myText",game.imagesFolder+"/myImages.png",1,1,2,1,"GUI")
    
    -- show the image every time the opponent note press
    function onNotesOpponentHit() 
      images.style.visibility = "visible";
    
      setTimeOut(function (--[[ wait 1 sec ]])
        images.style.visibility = "hidden"
      end,1000) -- 1 sec
    end
  

FMS-makeFolder

FMS_makeFolder() can be used for put any element in or derivate for turn it into a UI !

FMS_makeFolder(id = "element",putIn = "default")
  

exemple :


    FMS_makeFolder("myFolder","GUI")
  

avansed exemple :


    var folder = FMS_makeFolder("myFolder","GUI");
    folder.appendChild(game.gui); // put all the gui in the folder xd
    
    // or
    
    folder.style.backgroundColor = "blue"; // make all the background blue
    folder.style.width = "100px";
    folder.style.height = "100px";
  

    local folder = FMS_makeFolder("myFolder","GUI");
    folder.appendChild(game.gui) -- put all the gui in the folder xd
    
    -- or
    
    folder.style.backgroundColor = "blue" -- make all the background blue
    folder.style.width = "100px"
    folder.style.height = "100px"
  

FMS-saveFile

FMS_saveFile() can be used for save any element in file !

FMS_saveFile(filename = "myText.txt",data = "hello words !",as = "text/plain")
  

exemple :


    FMS_saveFile("myList.txt","idk why there nothing.",as = "text/plain");
  

avansed exemple :


    function onGameStart() {
      FMS_saveFile("stealedEvent.txt",game.events); // save all events.FM
    }
  

    function onGameStart() 
      FMS_saveFile("stealedEvent.txt",game.events) -- save all events.FM
    end
  

make anime/animate.js :


makeLocalAnim

for making custom anim in start with this simple scripts :] : work same with lua

makeLocalAnim("mySprite",game.modsFolder +"/images/myAnimation,10,0,0,1,"GAME",100,true,0,0, false, false)

working like that :

makeLocalAnim(id, src, length, x, y, scale, putIn, speed, isloop, xdelay, ydelay, flip, paddingLength, otherCss)



// you can use this for that    ex: "ease"
// rotate the game
var myEase = "ease-in";
var myAnimation = FMS_makeCSSanim("GAME",1,myEase,"1",[
  { transform: 'rotate(95deg)' }
])
myAnimation.play();
myAnimation.onfinish = function(){}

ease/custom movent :


easing

linear :

ease :

step :

more value here !