An animation tool for other scripts to utilize. The goal of this script is to make interacting with animations much easier for other developers. This Script allows other script creators to leverage pre-made animations and animation combos with ease of use in mind.
- Download this repo
- Copy and paste
vorp_animations
folder toresources/vorp_animations
- Add
ensure vorp_animations
to yourserver.cfg
file - Now you are ready to get coding!
local Animations = exports.vorp_animations.initiate()
Animations.playAnimation(animationname, length)
Example:
Animations.playAnimation('campfire', 2000)
setCustomProp(propobject)
This must be used before playing an animation to take effect
Example:
Animations.setCustomProp({
model = 'w_melee_knife06',
coords = {
x = -0.01,
y = -0.02,
z = 0.02,
xr = 190.0,
yr = 0.0,
zr = 0.0
},
bone = 'SKEL_R_Finger13',
subprops = {
{
model = 'p_redefleshymeat01xa',
coords = {
x = 0.00,
y = 0.02,
z = -0.20,
xr = 0.0,
yr = 0.0,
zr = 0.0
}
}
}
})
Animations.startAnimation(animationname)
Example:
Animations.startAnimation('campfire')
Animations.playAnimation(animationname)
Example:
Animations.endAnimation('campfire')
To Activate set Config.DevTools
to true and then in-game use the /startanimation animationname
command
- Displays the current animation playing
- Lets you manipulate the main props location easily and lets you copy the coords to the config easily
- A DevTool Command list
New animations should be added and PR'd to this repo to ensure the best animation for all!
Animations can be added via the config.lua of this scripts
Where to find animation dict and name: https://raw.githubusercontent.com/femga/rdr3_discoveries/master/animations/ingameanims/ingameanims_list.lua
-- ["nameofyouranimation"] = {
-- dict = "amb_camp@world_camp_fire_cooking@male_d@wip_base",
-- name = "wip_base",
-- flag = 17, -- This is a flag that limits where the animation plays on the character
-- type = 'standard', -- standard or scenario, not super well supported yet
-- prop = { -- If you want a prop to be within the animation
-- model = 'p_stick04x', -- What model should be shown for th prop
-- coords = { -- Where should the prop be placed
-- x = 0.2,
-- y = 0.04,
-- z = 0.12,
-- xr = 170.0,
-- yr = 50.0,
-- zr = 0.0
-- },
-- bone = 'SKEL_R_Finger13', -- what bone should the prop be connected too
-- subprops = { -- Add more props and locations
-- {
-- model = 's_meatbit_chunck_medium01x',
-- coords = {
-- x = -0.30,
-- y = -0.08,
-- z = -0.30,
-- xr = 0.0,
-- yr = 0.0,
-- zr = 70.0
-- }
-- }
-- }
-- }
-- },