EngineReplaceAnimation: Difference between revisions
(→Syntax) |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
This function replaces a specific internal (default) animation with a custom one that has been loaded using [[EngineLoadIFP|engineLoadIFP]] function. This function only affects a specific [[player]] or [[ped]], the [[Animations|internal animation]] is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it. | |||
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, "FightA_block" animation from "ped" block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem. | |||
==Syntax== | ==Syntax== | ||
Line 10: | Line 12: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for. | *'''thePed:''' the [[player]] or [[ped]] you want to replace an animation for. | ||
*'''InternalBlockName:''' the internal block name. | *'''InternalBlockName:''' the [[Animations|internal block]] name. | ||
*'''InternalAnimName:''' the internal animation name inside InternalBlockName. | *'''InternalAnimName:''' the [[Animations|internal animation]] name inside InternalBlockName. | ||
*'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter. | *'''CustomBlockName:''' the custom block name of the loaded IFP file that you passed to [[EngineLoadIFP|engineLoadIFP]] as second parameter. | ||
*'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName. | *'''CustomAnimName:''' the custom animation name inside the loaded IFP file with CustomBlockName. |
Revision as of 17:36, 18 June 2018
This function replaces a specific internal (default) animation with a custom one that has been loaded using engineLoadIFP function. This function only affects a specific player or ped, the internal animation is not replaced for everyone, for instance, different players and peds are able to have completely different crouching, walking, and fighting etc., animations running simultaneously at the same time. Also, it's not synchronized, you'll need to execute this function on every client in Lua to synchronize it.
It should be noted that partial animations are not supported, you can still replace them, but they won't work as intended, for example, "FightA_block" animation from "ped" block is a partial animation, you can't replace it properly, only a few animations are partial, rest of them are not, so it shouldn't be a problem.
Syntax
bool engineReplaceAnimation ( ped thePed, string InternalBlockName, string InternalAnimName, string CustomBlockName, string CustomAnimName )
Required Arguments
- thePed: the player or ped you want to replace an animation for.
- InternalBlockName: the internal block name.
- InternalAnimName: the internal animation name inside InternalBlockName.
- CustomBlockName: the custom block name of the loaded IFP file that you passed to engineLoadIFP as second parameter.
- CustomAnimName: the custom animation name inside the loaded IFP file with CustomBlockName.
Returns
Returns true on success, false in case of failure.
Example
-- @todo
See Also
- engineAddImage
- engineApplyShaderToWorldTexture
- engineFreeModel
- engineGetModelFlags
- engineGetModelIDFromName
- engineGetModelLODDistance
- engineGetModelNameFromID
- engineGetModelPhysicalPropertiesGroup
- engineGetModelTextureNames
- engineGetModelTextures
- engineGetModelTXDID
- engineGetModelVisibleTime
- engineGetObjectGroupPhysicalProperty
- engineGetSurfaceProperties
- engineGetVisibleTextureNames
- engineImageGetFilesCount
- engineImageGetFiles
- engineImageGetFile
- engineImageLinkDFF
- engineImageLinkTXD
- engineImportTXD
- engineLoadCOL
- engineLoadDFF
- engineLoadIMG
- engineLoadIFP
- engineLoadTXD
- engineRemoveImage
- engineRemoveShaderFromWorldTexture
- engineReplaceAnimation
- engineReplaceCOL
- engineReplaceModel
- engineRequestModel
- engineResetModelFlags
- engineResetModelLODDistance
- engineResetSurfaceProperties
- engineRestoreAnimation
- engineRestoreCOL
- engineRestoreDFFImage
- engineRestoreModel
- engineRestoreModelPhysicalPropertiesGroup
- engineRestoreObjectGroupPhysicalProperties
- engineRestoreTXDImage
- engineRestreamWorld
- engineSetAsynchronousLoading
- engineSetModelFlag
- engineSetModelFlags
- engineSetModelLODDistance
- engineSetModelPhysicalPropertiesGroup
- engineSetModelVisibleTime
- engineSetObjectGroupPhysicalProperty
- engineSetSurfaceProperties
- engineStreamingFreeUpMemory
- engineStreamingGetUsedMemory