-
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
How do i make a animated freeplay background? #13040
Comments
You can't . You have to use source. As far as I know Lua is usable only inside levels |
then how do i do it in source? |
bg.frames = Paths.getSparrowAtlas('filepath of the bg');
bg.animation.addbyPrefix('a name for the animation', 'name on xml', framerate, true); |
how do i get source? |
Download it here, |
ok so uh how do i use the file path of the bg in the |
just replace 'filepath of the bg' with the name of the spritesheet, it should be shared/images |
is there any vids that could also help me |
Do you have the animated spritesheet? |
yes |
did you put it in the images subfolder inside the shared folder ? |
in the assets/images |
if you name the bg for example 'stupid_bg' you should use |
for some reason i did that but it doesnt show up in the freeplay it only show the normal bg |
Wait why is the framerate at 1fps? |
uh i am gonna change that i accidentally used 1 |
Can you Pass me the spritesheet and the xml? |
ok wait |
wait how? |
send me like drive or mega.nz link |
ok |
https://drive.google.com/drive/folders/1MLB1SWSiNkktw05aZimC199GV9bfxLGq?usp=drive_link
|
dont mind it being clouds bc its a test bg |
i don't have acess |
oh wait |
hello you there? |
Figured it out... I think. It plays for me. bg = new FlxSprite().loadGraphic(Paths.image('testbg', 'shared'), true);
bg.frames = Paths.getSparrowAtlas('testbg', 'shared');
bg.animation.addByPrefix('idle', 'idle', 12); //Or whatever is the fps idgaf
bg.animation.play('idle');
bg.antialiasing = ClientPrefs.globalAntialiasing;
add(bg);
bg.screenCenter(); |
sorry for wasting your time but can you help me with that |
nvm it worked |
i couldnt use sources bc it wouldnt let me start or play |
hey uh im having issues with my source it says |
Describe your problem here.
so i wanted to make a animated freeplay background but i dont know how to make that so i need help
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
The text was updated successfully, but these errors were encountered: