ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.15k stars 2.21k forks source link

Window move help #8943

Closed machonessiebaby closed 2 years ago

machonessiebaby commented 2 years ago

Describe your problem here.

i need some help making the window move down the screen this is my code so far image i just need to make it move left or right but currently it does nothing

copy paste code so its easier to help with a fix i think i may be too used to 4.2 then 5.2h but yk



function onUpdate()
songPos = getSongPosition()
currentBeat = (songPos/5000)*(curBpm/60)

setPropertyFromClass('openfl.Lib','application.windows.x', math.cos(currentBeat*speed)*1250+1250)
setPropertyFromClass('openfl.Lib','application.windows.y', math.tan(currentBeat*speed)*1000+200)
end```

### Are you modding a build from source or with Lua?

Lua

### What is your build target?

Windows x64

### Did you edit anything in this build? If so, mention or summarize your changes.

sound changes and 2 custom achievements, 4 custom credits playstate.hx titlestate.hx main.hx healthicon.hx  a LOT MORE
Itz-Miles commented 2 years ago

I remember the respective tags being 'application.window.x', and 'application.window.y'.

machonessiebaby commented 2 years ago

I remember the respective tags being 'application.window.x', and 'application.window.y'.

i fixed that but its still broken

speed = 50

function onUpdate()
songPos = getSongPosition()
currentBeat = (songPos/5000)*(curBpm/60)

setPropertyFromClass('openfl.Lib','application.window.x', math.cos(currentBeat*speed)*1250+1250)
setPropertyFromClass('openfl.Lib','application.window.y', math.tan(currentBeat*speed)*1000+200)
end
Itz-Miles commented 2 years ago

I heard that they updated the syntax for the onUpdate() stuff. You could check the wiki to see what/when you want the script to work, paste what error the script is giving, check the script's file location, or even change what's in the script to look for differences. Otherwise, there's nothing wrong with the code now.

machonessiebaby commented 2 years ago

I heard that they updated the syntax for the onUpdate() stuff. You could check the wiki to see what/when you want the script to work, paste what error the script is giving, check the script's file location, or even change what's in the script to look for differences. Otherwise, there's nothing wrong with the code now.

i may have fucked up the funkin lua when i added the gamejolt api who knows man also the wiki half the scripts dont work on there anymore for me

machonessiebaby commented 2 years ago

im on the github build when they removed Awards grid