ShadowMario / FNF-PsychEngine

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

How do I make notes form into a circle and make each note have a different scroll speed? #771

Closed MarkToonsHD closed 3 years ago

MarkToonsHD commented 3 years ago

Describe your problem here.

Hello! So I'm trying to find out a .lua script that makes the notes swarm in a circle and have each note have a different scroll speed, like in the newest song from the Dave and Bambi mod, Unfairness (like this, for example: https://www.youtube.com/watch?v=vicmsm4YTlM)

I would definitely appreciate anyone who helps me with this :)

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows

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

No response

DevScyu commented 3 years ago

That is built on KadeEngine, see the source code here: https://github.com/MoldyGH/VsDave

I highly doubt that you would be able to do this via lua, you will need to do source edits.

MeowcaTheoRange commented 3 years ago

I highly doubt that you would be able to do this via lua, you will need to do source edits.

I mean, if you can at least tween the notes, then the circle part could be possible. Not sure about the part with the scroll speed, though.

ShadowMario commented 3 years ago

Currently i have this script for changing scroll speed made in Lua. It breaks sustain notes though so stay warned. mods.zip

lemonsxeed commented 3 years ago

i made a recreation of unfairness lol

lemonsxeed commented 3 years ago

i used note tween because i forgot you could move strums with setpropertyfromclass lol but its stillt he same thing

function onUpdate(elapsed)
songPos = getSongPosition()
local currentBeat = (songPos/5000)*(curBpm/60)
noteTweenX(defaultPlayerStrumX0, 4, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + 0) * 300), 0.001)
noteTweenX(defaultPlayerStrumX1, 5, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + 1) * 300), 0.001)
noteTweenX(defaultPlayerStrumX2, 6, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + 2) * 300), 0.001)
noteTweenX(defaultPlayerStrumX3, 7, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + 3) * 300), 0.001)
noteTweenY('defaultPlayerStrumY0', 4, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + 0) * 300), 0.001)
noteTweenY('defaultPlayerStrumY1', 5, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + 1) * 300), 0.001)
noteTweenY('defaultPlayerStrumY2', 6, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + 2) * 300), 0.001)
noteTweenY('defaultPlayerStrumY3', 7, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + 3) * 300), 0.001)
noteTweenX('fake1', 0, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + (4) * 2) * 300), 0.001)
noteTweenX('fake2', 1, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + (5) * 2) * 300), 0.001)
noteTweenX('fake3', 2, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + (6) * 2) * 300), 0.001)
noteTweenX('fake4', 3, ((screenWidth / 2) - (157 / 2)) + (math.sin((currentBeat) + (7) * 2) * 300), 0.001)
noteTweenY('defaultFPlayerStrumY0', 0, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + (4) * 2) * 300), 0.001)
noteTweenY('defaultFPlayerStrumY1', 1, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + (5) * 2) * 300), 0.001)
noteTweenY('defaultFPlayerStrumY2', 2, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + (6) * 2) * 300), 0.001)
noteTweenY('defaultFPlayerStrumY3', 3, ((screenHeight / 2) - (157 / 2)) + (math.cos((currentBeat) + (7) * 2) * 300), 0.001)
end
whoisitlolxd commented 8 months ago
function onCreate()
   for i=0, getProperty('unspawnNotes.length')-1 do
       setPropertyFromGroup('unspawnNotes', i, 'multSpeed', getRandomFloat(.1,3))
   end
end

for the speed used 0.6.3 at the time of writing this

i know this is old but am i not allowed to reply tho