Open EliteMasterEric opened 2 years ago
The scheme I thought of that would create minimal code changes:
addCharacter(charId, charIndex = next)
. The return value would be the newly created character's index (defaulting to the next available), which scripts should store as a variable to reference later (you should be able to create 'global' variables in scripts).setCharacterVisible(true/false)
would set whether the character is visible or not.deleteCharacter()
would remove the character from the scene. This will permanently discard the character; use this if you don't need them in memory anymore.setCharacterId(charIndex, charId)
will change the character of the given character. For example, setCharacterId(2, 'monster')
will change character 2 to monster.setCharacterMode(charIndex, mode)
will set the animation mode of the character. Default is 0 (idle animation by default), 1 (play BF note animations), 2 (play CPU note animations), 3 (play idle animation by BPM, like GF). If you want to control animations yourself, use the function below.setCharacterAnimation(charIndex, animName, duration = 0)
will play a specific animation on that character. Set a duration to force a specific duration.
idle
.
80% of this issue is figuring out exactly what I want and how.
As it stands, there's no easy method to pull off something like Tricky in Accelerant or Evil Sonic in Chaotic Endeavors.
(On second thought, Tricky could be made to be the character, with the speakers and Hank as pure sprites, but Evil Sonic is still a second character that needs the ability to take camera focus).