Closed fnfporterhi closed 1 year ago
actually not easy im going to kill myself ive been doing so many fucking ports from lua to haxe im tired of fucking things up and making them harder i hate everything
ah
tbh i just need it for backgrounds
im gonna try another way of adding songs to the shit
ah okay, imma try to make lua to haxe for some cuphead shit
since i dont know how
like reading lua is easy if its properly formatted
lets take for example the stage lua from challenge hank folder from the pending folder from the repo
function onCreate()
makeLuaSprite('city', 'nevada/nevada_city', -600, -100) --the background
addLuaSprite('city', false);
setProperty('city.scale.x', getProperty('city.scale.x') + 0.6);
setProperty('city.scale.y', getProperty('city.scale.y') + 0.2);
makeLuaSprite('stage', 'nevada/nevada_stage', -400, -220); --the stage where everybody sings!
addLuaSprite('stage', false);
setProperty('stage.scale.x', getProperty('stage.scale.x') + 0.6);
setProperty('stage.scale.y', getProperty('stage.scale.y') + 0.8);
if not lowQuality then
makeLuaSprite('foreground', 'nevada/nevada_foreground', -970, -215); --the foreground, aka tent with the word MADNESS on it
addLuaSprite('foreground', true);
setProperty('foreground.scale.x', getProperty('foreground.scale.x') + 0.75);
setProperty('foreground.scale.y', getProperty('foreground.scale.y') + 0.8);
makeLuaSprite('hill', 'nevada/nevada_hill', -200, 100) --the hill that deimos and sanford occupy.
addLuaSprite('hill', false);
setProperty('hill.scale.x', getProperty('hill.scale.x') + 0.8);
setProperty('hill.scale.y', getProperty('hill.scale.y') + 0.6);
setLuaSpriteScrollFactor('hill', 0.94, 0.94);
end
end
hm okay
the function onCreate() is executed when the engine calls the lua on the exact time
as the lua file we are currently talking about is a stage then you have to go to playstate and the place where you create stages
so would you remove that?
here
we read the lua file and we analyze it
ah i see, so for the makeLuaSprite we would have to rename that?
makeLuaSprite('city', 'nevada/nevada_city', -600, -100) --the background
by reading the FunkinLua.hx file (from newer versions) we can guess that makeLuaSprite its creating a sprite so in haxe it would be like this:
wait
this is better
i see
if we keep reading the lua file we can see that addLuaSprite('city', false);
the sprite lua created is being added so thats what the add line does (i forgot what the boolean does there)
ah, so ill let you know if i sorta got i, and if you need to fix it
if we keep reading the lua file (even more) we see this setProperty changes some property from a lua object in this case a sprite, in haxe it would be like this:
lua is easy if the file you are reading and analyzing is properly formatted and you have a reference of what the functions do (You can open another tab of FunkinLua.hx from your respective Psych Version and search the function throughout the file)
okay
got this in
you gotta translate it to haxe code
ik ik, sorry i hid it so ppl cant get your things,
ok so wait send me the link of what website you’re using for this. i wanna try this out on my laptop!
also can you guys use a seperate issue
you’re blowing up my watch
ik ik, sorry i hid it so ppl cant get your things,
password protected remember
also can you guys use a seperate issue
you’re blowing up my watch
sorry bro
ah lol, sorry
challenge-edd
only cause i just want to prank my friend with eduardo lol
plus i just love the mod i’m a eduardo fanatic