Fixed note stuff, added a funny script to satin-panties

This commit is contained in:
entar 2025-06-10 22:28:24 +07:00
parent d1d8054c48
commit fd2f5921f7
7 changed files with 95 additions and 106 deletions

View File

@ -1,97 +0,0 @@
-- RANK ONLY UP TILL 20, 0 MINIMUM, CHANGE THIS TO SUGGEST HOW HARD THE SONG IS, BY MARKEDAMAN
function onCreate()
if difficulty == 0 then -- easy
rank = 2
elseif difficulty == 1 then -- normal
rank = 3
elseif difficulty == 2 then -- hard
rank = 4
elseif difficulty == 3 then -- erect
rank = 13
elseif difficulty == 4 then -- nightmare
rank = 14
end
end
function onCreatePost()
if not hideHud then
if rank > 10 then
makeLuaSprite('star', 'star2', 1070, 590)
makeAnimatedLuaSprite('starFlame', 'starFlame', 1030, 440)
addAnimationByPrefix('starFlame', 'starFlame', 'fire loop full instance', 24, true)
setProperty('starFlame.alpha', 0)
scaleObject('starFlame', 1.5, 1.5)
setObjectCamera('starFlame', 'hud')
addLuaSprite('starFlame', true)
elseif rank <= 10 then
makeLuaSprite('star', 'star1', 1070, 590)
end
scaleObject('star', 0.9, 0.9)
setObjectCamera('star', 'hud')
setObjectOrder('star', getObjectOrder('starFlame') + 1)
setProperty('star.alpha', 0)
addLuaSprite('star')
makeLuaText('difficulty', ''.. rank ..'', 2230 , 0, 620)
setTextSize('difficulty', 37)
setTextFont('difficulty', 'combo.ttf')
setProperty('difficulty.alpha', 0)
addLuaText('difficulty', false)
setObjectOrder('difficulty', getObjectOrder('star') + 1)
if downscroll then
setProperty('difficulty.y', 70)
setProperty('star.y', 40)
setProperty('starFlame.y', -5)
setProperty('starFlame.angle', 190)
end
if rank > 10 then
setTextColor('difficulty', 'ffffff')
setTextBorder('difficulty', 2, '00AEFF')
elseif rank <= 10 then
setTextColor('difficulty', '000000')
setTextBorder('difficulty', 3, 'FFFFFF')
end
runTimer('ready', 0.5) -- star fade in
runTimer('wait', 8) -- star fade out
runTimer('wait2', 7.5) -- difficulty fade out
if rank > 10 then
runTimer('pausefire', 2) -- difficulty fade in
elseif rank <=10 then
runTimer('pause', 2)
end
end
end
function onTimerCompleted(tag)
if not hideHud then
if tag == 'ready' then
doTweenAlpha('hi', 'star', 1, 0.5,'linear')
end
if tag == 'wait' then
doTweenAlpha('gone', 'star', 0, 0.5,'linear')
doTweenAlpha('fireout', 'starFlame', 0, 0.5,'linear')
end
if tag == 'wait2' then
doTweenAlpha('bye', 'difficulty', 0, 0.5,'linear')
end
if tag == 'pause' then
doTweenAlpha('hi2', 'difficulty', 1, 0.5,'linear')
end
if tag == 'pausefire' then
setProperty('difficulty.alpha', 1)
setProperty('starFlame.alpha', 1)
playSound('light', 0.7)
end
end
end

View File

@ -1,4 +0,0 @@
function onCreate()
setTextFont('scoreTxt', 'vcr.ttf')
setTextFont('timeTxt','timer.ttf')
end

View File

@ -0,0 +1,41 @@
local module = {}
local myMath = require("modules.math")
local lastChange = 0
local amp = 50
local enabled = false
function module.onCreate()
lastChange = 0
end
local randoms = {
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140),
math.random(60, 140)
}
local realPositions = {
600,
679,
758,
837
}
function module.onUpdate(dt, elapsed)
if enabled then
for index, receptor in next, module.shared.receptors do
receptor.position.x = realPositions[index] + 50 * math.sin(elapsed / randoms[index])
end
end
end
return module

47
log.log

File diff suppressed because one or more lines are too long

View File

@ -449,7 +449,7 @@ local function state(songName, songDifficulty)
score = score - 200
end
else
note.sprite.position = myTypes.Vector2(receptors[note.direction].position.x + note.offset.x, settings.Downscroll and receptors[note.direction].position.y - (note.position-elapsed) * speed or receptors[note.direction].position.y + (note.position - elapsed) * speed)
note.sprite.position = myTypes.Vector2(opponentReceptors[note.direction].position.x + note.offset.x, settings.Downscroll and opponentReceptors[note.direction].position.y - (note.position-elapsed) * speed or opponentReceptors[note.direction].position.y + (note.position - elapsed) * speed)
if (note.position - elapsed) * speed < 10 then
notes[index] = nil
if section.gfSection or chart.song == "Tutorial" then
@ -699,6 +699,8 @@ local function state(songName, songDifficulty)
receptor.layer = 9
receptor.ui = true -- So it doesnt move with the camera.
opponentReceptors[i + 1] = receptor
end
-- Load the notes AFTER the receptors to make sure they are always above them

View File

@ -23,7 +23,8 @@ function module.note(raw, mustHitSection, hold, holdEnd)
hold = hold,
last = holdEnd,
hitHealth = 0.02,
missHealth = 0.1
missHealth = 0.05,
offset = module.types.Vector2()
}, NoteClass)
return newNote
@ -37,6 +38,7 @@ function NoteClass:spawn()
local spriteName
if self.hold then
sprite.layer = 9
self.offset.x = 20
if self.holdEnd then
sprite.layer = 10
spriteName = string.format("%s hold end", sprites[self.direction])

View File

@ -55,7 +55,7 @@ function stage.onBeat(beat)
cd = math.random(20, 25)
train.position = myTypes.Vector2(2000, 600)
trainPassing = true
stage.characters.gf:PlayAnimation("hairBlow")
stage.shared.characters.gf:PlayAnimation("hairBlow")
end
end
end
@ -66,7 +66,7 @@ function stage.onUpdate(dt)
--passing:play()
if train.position.x < -4000 then
trainPassing = false
stage.characters.gf:PlayAnimation("hairFall")
stage.shared.characters.gf:PlayAnimation("hairFall")
end
end
--interesting