ShadowMario / FNF-PsychEngine

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

The Animated Background On The Options. #10572

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe your problem here.

Can You Show Me How To Add The Animated Background For The Options

Are you modding a build from source or with Lua?

Source

What is your build target?

Windows x64

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

It's For My Engine

ghost commented 2 years ago

Like From This Video: https://youtu.be/PGQFeCmKtgw

DisIsNOt commented 2 years ago

first make a var ass:FlxSprite;

then

ass = new FlxSprite().loadGraphic(); ass.frames = Paths.getSparrowAtlas('yourpath'); ass.animation.addByPrefix('idle', 'anim in xml', 24); ass.animation.play('idle') add(ass);

BernardoGP4504 commented 2 years ago

first put this image in assets/preload/images and call it overlay Sem título then in OptionsState.hx put this after the bg sprite is created/added:

var bg2:FlxSprite = new FlxSprite(0, 0).loadGraphic(Paths.image('overlay'));
bg.alpha = 0.56; //i believe that this is the opacity of the overlay shown in the video
add(bg);

FlxTween.tween(bg2, { x: 300, y: 200 }, 0.4, { type: FlxTweenType.LOOPING });

if the overlay goes offscreen then mess with the 300 and 200 properties in the tween and if the speed is wrong then change that 0.4

BernardoGP4504 commented 2 years ago

first make a var ass:FlxSprite;

then

ass = new FlxSprite().loadGraphic(); ass.frames = Paths.getSparrowAtlas('yourpath'); ass.animation.addByPrefix('idle', 'anim in xml', 24); ass.animation.play('idle') add(ass);

it would be ass hard to do it in a animation (pun intended)

ghost commented 2 years ago

first put this image in assets/preload/images and call it overlay Sem título then in OptionsState.hx put this after the bg sprite is created/added:

var bg2:FlxSprite = new FlxSprite(0, 0).loadGraphic(Paths.image('overlay'));
bg.alpha = 0.56; //i believe that this is the opacity of the overlay shown in the video
add(bg);

FlxTween.tween(bg2, { x: 300, y: 200 }, 0.4, { type: FlxTweenType.LOOPING });

if the overlay goes offscreen then mess with the 300 and 200 properties in the tween and if the speed is wrong then change that 0.4

I Can Change overlay What I Want?

ghost commented 2 years ago

first put this image in assets/preload/images and call it overlay Sem título then in OptionsState.hx put this after the bg sprite is created/added:

var bg2:FlxSprite = new FlxSprite(0, 0).loadGraphic(Paths.image('overlay'));
bg.alpha = 0.56; //i believe that this is the opacity of the overlay shown in the video
add(bg);

FlxTween.tween(bg2, { x: 300, y: 200 }, 0.4, { type: FlxTweenType.LOOPING });

if the overlay goes offscreen then mess with the 300 and 200 properties in the tween and if the speed is wrong then change that 0.4

I Can Change overlay What I Want?

The Compile It's Successfully

ghost commented 2 years ago

It's Not Working, But Code It's Work. Screenshot_20220919-205640 Ignore The Serbian Language.

ghost commented 2 years ago

It's Not Working, But Code It's Work. Screenshot_20220919-205640 Ignore The Serbian Language.

I Just Added What You Sayed, But It's Not Working.

BernardoGP4504 commented 2 years ago

Weird, did you put what code i send? The first or the second?

Em seg, 19 de set de 2022 15:59, Stefan{BETA}™(S.M) < @.***> escreveu:

It's Not Working, But Code It's Work. [image: Screenshot_20220919-205640] https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Ignore The Serbian Language.

I Just Added What You Sayed, But It's Not Working.

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1251421781, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.***>

ghost commented 2 years ago

Weird, did you put what code i send? The first or the second? Em seg, 19 de set de 2022 15:59, Stefan{BETA}™(S.M) < @.> escreveu: It's Not Working, But Code It's Work. [image: Screenshot_20220919-205640] https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Ignore The Serbian Language. I Just Added What You Sayed, But It's Not Working. — Reply to this email directly, view it on GitHub <#10572 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.>

Yeah, But It's Not Showing The Image

BernardoGP4504 commented 2 years ago

Did you put the image in assets/preload/images

Em seg, 19 de set de 2022 20:49, Stefan{BETA}™(S.M) < @.***> escreveu:

Weird, did you put what code i send? The first or the second? Em seg, 19 de set de 2022 15:59, Stefan{BETA}™(S.M) < @.

> escreveu: … <#m-4378748225262682874> It's Not Working, But Code It's Work. [image: Screenshot_20220919-205640] https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Ignore The Serbian Language. I Just Added What You Sayed, But It's Not Working. — Reply to this email directly, view it on GitHub <#10572 (comment) https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1251421781>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.>

Yeah, But It's Not Showing The Image

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1251685382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.***>

ghost commented 2 years ago

Did you put the image in assets/preload/images Em seg, 19 de set de 2022 20:49, Stefan{BETA}™(S.M) < @.> escreveu: Weird, did you put what code i send? The first or the second? Em seg, 19 de set de 2022 15:59, Stefan{BETA}™(S.M) < @. > escreveu: … <#m-4378748225262682874> It's Not Working, But Code It's Work. [image: Screenshot_20220919-205640] https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Ignore The Serbian Language. I Just Added What You Sayed, But It's Not Working. — Reply to this email directly, view it on GitHub <#10572 (comment) <#10572 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.> Yeah, But It's Not Showing The Image — Reply to this email directly, view it on GitHub <#10572 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.>

And I Added The Image, But It's Showing Only The Color

BernardoGP4504 commented 2 years ago

What color?

Em ter, 20 de set de 2022 10:39, Stefan{BETA}™(S.M) < @.***> escreveu:

Did you put the image in assets/preload/images Em seg, 19 de set de 2022 20:49, Stefan{BETA}™(S.M) < @.

> escreveu: … <#m6496539232087976108> Weird, did you put what code i send? The first or the second? Em seg, 19 de set de 2022 15:59, Stefan{BETA}™(S.M) < @. > escreveu: … <#m-4378748225262682874> It's Not Working, But Code It's Work. [image: Screenshot_20220919-205640] https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Ignore The Serbian Language. I Just Added What You Sayed, But It's Not Working. — Reply to this email directly, view it on GitHub <#10572 https://github.com/ShadowMario/FNF-PsychEngine/issues/10572 (comment) <#10572 (comment) https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1251421781>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.> Yeah, But It's Not Showing The Image — Reply to this email directly, view it on GitHub <#10572 (comment) https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1251685382>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.>

And I Added The Image, But It's Showing Only The Color

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1252369675, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYE2G5ZR3SIV7MKVX4LV7G47JANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.***>

ghost commented 2 years ago

What color? Em ter, 20 de set de 2022 10:39, Stefan{BETA}™(S.M) < @.> escreveu: Did you put the image in assets/preload/images Em seg, 19 de set de 2022 20:49, Stefan{BETA}™(S.M) < @. > escreveu: … <#m6496539232087976108> Weird, did you put what code i send? The first or the second? Em seg, 19 de set de 2022 15:59, Stefan{BETA}™(S.M) < @. > escreveu: … <#m-4378748225262682874> It's Not Working, But Code It's Work. [image: Screenshot_20220919-205640] https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Ignore The Serbian Language. I Just Added What You Sayed, But It's Not Working. — Reply to this email directly, view it on GitHub <#10572 <#10572> (comment) <#10572 (comment) <#10572 (comment)>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.> Yeah, But It's Not Showing The Image — Reply to this email directly, view it on GitHub <#10572 (comment) <#10572 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.> And I Added The Image, But It's Showing Only The Color — Reply to this email directly, view it on GitHub <#10572 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYE2G5ZR3SIV7MKVX4LV7G47JANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.>

https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Here

BernardoGP4504 commented 2 years ago

Can you show the script again?

Em ter, 20 de set de 2022 10:54, Stefan{BETA}™(S.M) < @.***> escreveu:

What color? Em ter, 20 de set de 2022 10:39, Stefan{BETA}™(S.M) < @.

> escreveu: … <#m-915534353024895588> Did you put the image in assets/preload/images Em seg, 19 de set de 2022 20:49, Stefan{BETA}™(S.M) < @. > escreveu: … <#m6496539232087976108> Weird, did you put what code i send? The first or the second? Em seg, 19 de set de 2022 15:59, Stefan{BETA}™(S.M) < @. > escreveu: … <#m-4378748225262682874> It's Not Working, But Code It's Work. [image: Screenshot_20220919-205640] https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Ignore The Serbian Language. I Just Added What You Sayed, But It's Not Working. — Reply to this email directly, view it on GitHub <#10572 https://github.com/ShadowMario/FNF-PsychEngine/issues/10572 <#10572 https://github.com/ShadowMario/FNF-PsychEngine/issues/10572> (comment) <#10572 https://github.com/ShadowMario/FNF-PsychEngine/issues/10572 (comment) <#10572 (comment) https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1251421781>>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYFJ3OVHCTH2QVGJT43V7CZX7ANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.> Yeah, But It's Not Showing The Image — Reply to this email directly, view it on GitHub <#10572 https://github.com/ShadowMario/FNF-PsychEngine/issues/10572 (comment) <#10572 (comment) https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1251685382>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYBFEFGQSG2DSI4RPSTV7D32NANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.> And I Added The Image, But It's Showing Only The Color — Reply to this email directly, view it on GitHub <#10572 (comment) https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1252369675>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYE2G5ZR3SIV7MKVX4LV7G47JANCNFSM6AAAAAAQPF3RVQ https://github.com/notifications/unsubscribe-auth/AYFVJYE2G5ZR3SIV7MKVX4LV7G47JANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.>

https://user-images.githubusercontent.com/109828559/191094486-78023359-3d5e-408e-b677-77572664c84a.png Here

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1252390713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYFPQHMXCIIOWFAXVPDV7G62DANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.***>

CrusherNotDrip commented 2 years ago
var bg2:FlxSprite = new FlxSprite(0, 0).loadGraphic(Paths.image('overlay'));

bg.alpha = 0.56; //i believe that this is the opacity of the overlay shown in the video

add(bg);

why did you add bg instead of bg2 💀

BernardoGP4504 commented 2 years ago

Weird, but just put the 2 after the bg: add(bg2);

Also why did you remove the tween part

Em ter, 20 de set de 2022 11:27, CrusherNotDrip @.***> escreveu:

var bg2:FlxSprite = new FlxSprite(0, 0).loadGraphic(Paths.image('overlay'));

bg.alpha = 0.56; //i believe that this is the opacity of the overlay shown in the video

add(bg);

why did you add bg instead of bg2 💀

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#issuecomment-1252437086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYAKY6DS5IWBO5CQ3VTV7HCVFANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.***>

BernardoGP4504 commented 2 years ago

🤦🏻‍♂️

Em ter, 20 de set de 2022 11:34, Stefan{BETA}™(S.M) < @.***> escreveu:

Closed #10572 https://github.com/ShadowMario/FNF-PsychEngine/issues/10572 as not planned.

— Reply to this email directly, view it on GitHub https://github.com/ShadowMario/FNF-PsychEngine/issues/10572#event-7422944080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYFVJYF4R23L6QCKAJEZQ53V7HDRFANCNFSM6AAAAAAQPF3RVQ . You are receiving this because you commented.Message ID: @.*** com>