-
Notifications
You must be signed in to change notification settings - Fork 2.2k
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Score Text With Lua (and some arrow hud thing which is optional lmao) #14777
Comments
setProperty("scoreText.txt","SCORE: " .. score .. " // COMBO BREAKS: " .. misses);
|
Could you show your code for the animated arrows? |
i dont have any code for them, i animated them to have a long fade thing, if you need an example im trying to make it look how it does in the reworked skylimit teaser here: https://www.youtube.com/watch?v=bV8DZZFB9vo |
btw that doesnt work 😭 |
oops mb setProperty("scoreTxt.text","SCORE: " .. score .. " // COMBO BREAKS: " .. misses); |
yeah man i noticed that and changed it, still doesnt work. I tried this method a while ago and even then it didnt work which is why i asked on here |
That's weird. What version are you using? |
0.7.3, base version i havent made any modifications to the exe or compiled it, downloaded straight from the github |
Hmm... setProperty("scoreTxt.text","SCORE: " .. score .. " // COMBO BREAKS: " .. misses); is working fine for me (I'm using version 0.7.3)... |
ah ok, i was using onUpdate, lemme try with post |
kk, ill wait |
holy shit that worked 😭 |
thanks man, also any luck with the notes fading thing? |
Nah, i haven't looked into it yet. Ill get to it in a bit tho. |
aight ill wait patiently - tysm |
Ah crap, it's been about two days and i haven't started on it . . . ill try to get it done by tonight |
Dude i finally got the script! function onCreatePost()
local arrow_dirs = {"left", "down", "up", "right"};
for i = 0, 3 do
makeLuaSprite(arrow_dirs[i+1].."_arrow_glow","arrow_glows/"..arrow_dirs[i+1],getProperty("playerStrums.members["..tostring(i).."].x"),getProperty("playerStrums.members["..tostring(i).."].y"));
addLuaSprite(arrow_dirs[i+1].."_arrow_glow",true);
setObjectCamera(arrow_dirs[i+1].."_arrow_glow","hud");
setProperty(arrow_dirs[i+1].."_arrow_glow.alpha",0);
end
end
function onUpdate(delta)
local arrow_dirs = {"left", "down", "up", "right"};
for i = 1, 4 do
if(keyJustPressed(arrow_dirs[i]))then
local key = arrow_dirs[i];
setProperty(key.."_arrow_glow.alpha",getProperty("playerStrums.members["..tostring(i-1).."].alpha"));
doTweenAlpha(key.."_arrow_glow_alpha", key.."_arrow_glow", 0, 0.4, "linear");
end
end
end
function goodNoteHit(membersIndex, noteData, noteType, isSustainNote)
local arrow_dirs = {"left", "down", "up", "right"};
local key = arrow_dirs[noteData+1];
setProperty(key.."_arrow_glow.alpha",getProperty("playerStrums.members["..tostring(noteData).."].alpha"));
doTweenAlpha(key.."_arrow_glow_alpha", key.."_arrow_glow", 0, 0.4, "linear");
end |
So, works differently than just an animation integrated into the note skin, it makes graphics that ARE the note glows and whenever the user taps the keys it appears and then fades out. |
Oh, yea, and if you wanna make it so when the user ghost holds down the key, the note glow stays, then replace |
HOLY SHIT!!!! THANK YOU SO MUCH BRO |
LEMME TEST THIS |
DID IT WORK ?? |
UHHH YES AND NO, THE TEXTURES DONT APPEAR SO IT JUST HAS THE HAXEFLIX LOGO |
DID YOU FORGET TO PUT THE ARROW GLOW TEXTURES IN THE CORRECT PATH? |
|
OH WAIT |
also the arrow glows directory should be in images i assume |
sadly you have to export it as each individual image, idk how to do spritesheets in lua |
yea |
got it |
do you know the dimensions that each arrow should be? |
uhhhh, ah crap, i don't, it should just be the arrow strum's dimensions |
ok, the dimensions should be something around 96x96 |
any updates? |
@PumpkinSheee did you forget about this post? uhh its been idle for a while by now. |
oh shi mb bro |
Lfg |
Describe your problem here.
so basically the basic score text on the hud is "SCORE: 0 | MISSES: 0 | RATING: ?" but is there any way to edit it with lua to something like "SCORE: 0 // COMBO BREAKS:0" without the rating text
and for the arrow hud thing, im trying to make each arrow press have a fade, so that whenever an arrow is pressed instead of the usual 2 frame return animation its a nice tweened smooth return, i have animated it but it only works if i keep the arrow pressed - and as far as i know theres no way to force the confirmation animation to play fully
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.
No response
The text was updated successfully, but these errors were encountered: