How to make Change Character Event but it's work on mobile #5888
Replies: 1 comment 1 reply
-
Here is a script I wrote for you `package ; import funkin.play.PlayState; class ChangeCharacterAction extends Module
}` On mobile, (both iOS and Android) asset packing and loading is different CharacterDataParser.fetchCharacter can fail when character JSON or spritesheets are not packaged the same way as on desktop. The original code also skipped building the character cache on mobile (because of the FlxG.onMobile guard), which left the module trying to dynamically load characters during runtime a source of crashes on mobile if assets aren't present or loading throws. Dynamic character loading works on desktop because files can be read from the filesystem. On mobile you must ensure every character's assets are included in the app bundle. Make sure the character folder (json, spritesheets, xml/png or image sequences) is added to your project assets so OpenFL can embed them. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I created a Change Character Event because it was needed for modding, but it doesn't work on the mobile version (at least iOS) and causes a crash.
Is there a way to make it work without crashing?
(I used DeepL)
Below is the code I wrote.
Beta Was this translation helpful? Give feedback.
All reactions