07-27-2011, 11:23
Hello
Another tutorial, this time is for animations, . All of this is taken from _animatedmodels.gsc, _destructible_types.gsc and _load.gsc.
Lets begin, first you need to load a animtree, load it at the beggining of a gsc file(is not necesary to be at top, but I recomend):
Here is a list of animtree names(only a few work on MP):
Find a anim you want on that animtree and now, is time to precache it, use this command on Init() in your mod:
Now, you can play your animation with this commands, use first just to play it:
This is basically all,
Credits:
- Se7en, he was the first in finding this, but he never released,
Another tutorial, this time is for animations, . All of this is taken from _animatedmodels.gsc, _destructible_types.gsc and _load.gsc.
Lets begin, first you need to load a animtree, load it at the beggining of a gsc file(is not necesary to be at top, but I recomend):
Code:
#using_animtree( "animtree name" );
Here is a list of animtree names(only a few work on MP):
Code:
ac130
animated_props
chair
civilian
destructibles
dog
door
drones
fastrope
generic_human
mg42
multiplayer
player
player_3rd_person
script_model
vehicles
Find a anim you want on that animtree and now, is time to precache it, use this command on Init() in your mod:
Code:
PrecacheMpAnim("animation you want");
Now, you can play your animation with this commands, use first just to play it:
Code:
entity ScriptModelPlayAnim( "animation you precached" ); //play animation
Code:
entity willNeverChange(); //makes the animation never change, it will only play the anim you gave it before.
Code:
entity scriptModelClearAnim( "animation you were using" ); //stop the animation that is being played
Code:
destructible_anim( get_precached_anim( "generator_explode" ), #animtree, "setanimknob", undefined, undefined, "generator_explode" ); //This is what destructibles use for animations, first selects the anim, then load animtrees(the one that you loaded,destructibles use animtree destructibles), the it sets this different play anim command: setanimknob, then it allow you to play on different tags and then the animation you want.
This is basically all,
Credits:
- Se7en, he was the first in finding this, but he never released,