{"id":"aloroid/character-animate","name":"character-animate","scope":"aloroid","platform":"roblox","description":"https://github.com/EgoMoose/character-animate","version":"0.0.3","latest":"0.0.3","versions":["0.0.3"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":false,"dependencies":{"stravant/goodsignal":{"version":"^0.2.1","alias":"Signal"}},"integrity":"b314e6658c2ee9354c3fefe26b52f8f5e5749aaa386dc6358df49b00e77cfac1","likes":0,"downloads":0,"install":"forest install aloroid/character-animate","url":"https://forest.dev/p/roblox/aloroid/character-animate","files":"https://api.forest.dev/ai/package/roblox/aloroid/character-animate/files","readme":"# Character Animate\r\nA replacement implementation of the `Animate` script that is typically loaded into characters by default.\r\n\r\nGet it here:\r\n\r\n* [Wally](https://wally.run/package/egomoose/character-animate)\r\n* [Releases](https://github.com/EgoMoose/character-animate/releases)\r\n\r\n## API\r\n\r\n```Lua\r\n--[=[\r\nCreates a new animate controller\r\n\r\n@param parent Instance -- The instance where custom animations will be loaded from\r\n@param director Humanoid -- The humanoid used to track state for transitioning animations\r\n@param performer Humanoid? -- The humanoid the animations will play on. Defaults to `director` if nil\r\n@return AnimateController: {\r\n\tcleanup: () -> (), -- stops the animate process\r\n\tplayEmote: (string | Animation) -> (boolean, AnimationTrack?), -- play an emote either by string name or animation instance\r\n}\r\n--]=]\r\nfunction module.animate(parent: Instance, director: Humanoid, performer: Humanoid?): AnimateController\r\n\r\n--[=[\r\nCreates a new animate controller that can transition states manually\r\n\r\n@param parent Instance -- The instance where custom animations will be loaded from\r\n@param performer Humanoid -- The humanoid the animations will play on\r\n@return AnimateControllerManually: {\r\n\tcleanup: () -> (), -- stops the animate process\r\n\tplayEmote: (string | Animation) -> (boolean, AnimationTrack?) -- play an emote either by string name or animation instance\r\n\tfireState: (Enum.HumanoidStateType, ...any) -> (), -- fire a humanoid state for a reactive animation\r\n\tsetMovement: (Vector3, number) -> (), -- set humanoid MoveDirection and WalkSpeed properties for animation calculation\r\n}\r\n--]=]\r\nfunction module.animateManually(parent: Instance, performer: Humanoid): AnimateControllerManually\r\n```\r\n\r\nAn example of using this package to replicate the standard `Animate` script:\r\n\r\n```Lua\r\n-- Animate.lua (placed under StarterCharacterScripts)\r\nlocal CharacterAnimate = require(...)\r\n\r\nlocal character = script.Parent\r\nlocal humanoid = character:WaitForChild(\"Humanoid\")\r\n\r\nlocal controller = CharacterAnimate.animate(script, humanoid)\r\n\r\nscript:WaitForChild(\"PlayEmote\").OnInvoke = function(emote)\r\n\treturn controller.playEmote(emote)\r\nend\r\n```","readmeTruncated":false}