UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

play multiple animations on a model

broken avatar :(
Created 7 years ago
by jakob9696
0 Members and 1 Guest are viewing this topic.
1,831 views
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 18 August 2015
Last active: 4 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Call me jjakob and not jakob9696 ;)
Signature
If you find errors in my post, excuse me for my bad english... I'm italian...

Developing custom banana colada script: https://youtu.be/OW_bIbCnXzo
Developing Gobblegums script: https://youtu.be/cWGzQ1dkTAE
×
jakob9696's Groups
jakob9696's Contact & Social Linksjjakobjjakob9696
I did not understand exactly how blend time and lerp time work in "Animscripted" function ...
From what I understand of blend time, it  "links" the animation for n time to a model and after n time clear others multiple anims but how do I make sure that the animation is active until a "StopAnimscripted"?

In my case, i want to play multiple anims on a model as origins pap does ( when each generators power up, add an anim on pap model); i've the following testing code:
Code Snippet
Plaintext
// using etc...
#precache( "model", "p6_zm_tm_packapunch" );
#precache( "xanim", "fxanim_zom_tomb_packapunch_pc1_anim");
#precache( "xanim", "fxanim_zom_tomb_packapunch_pc2_anim");
#precache( "xanim", "fxanim_zom_tomb_packapunch_pc3_anim");
#precache( "xanim", "fxanim_zom_tomb_packapunch_pc4_anim");
#precache( "xanim", "fxanim_zom_tomb_packapunch_pc5_anim");
#precache( "xanim", "fxanim_zom_tomb_packapunch_pc6_anim");
#precache( "xanim", "fxanim_zom_tomb_packapunch_pc7_anim");
#using_animtree( "zm_origins_pap" );

// init and other stuffs

function test_pap()
{
n_rate = 1;
// n_blend = .2;
n_blend = 10; // this allow multiple anims for 10 seconds -> after clear all other anims except frst

n_lerp = 0;
n_start_time = 0;
str_notify = undefined;
model = GetEnt("zm_origins_pap", "script_noteworthy");
// model UseAnimTree( "zm_origins_pap" );
model UseAnimTree( #animtree );

for( i = 1; i <= 7; i++ )
{
GetPlayers()[0] waittill("weapon_fired");
str_notify = "pap_part" + i + "_start";

switch( i )
{
case 1:
model AnimScripted( str_notify, model.origin, model.angles, %fxanim_zom_tomb_packapunch_pc1_anim , "normal", %root, n_rate, n_blend, n_lerp, n_start_time);
// model SetAnim( %fxanim_zom_tomb_packapunch_pc1_anim );
break;
case 2:
model AnimScripted( str_notify, model.origin, model.angles, %fxanim_zom_tomb_packapunch_pc2_anim , "normal", %root, n_rate, n_blend, n_lerp, n_start_time);
// model SetAnim( %fxanim_zom_tomb_packapunch_pc2_anim );
break;
case 3:
model AnimScripted( str_notify, model.origin, model.angles, %fxanim_zom_tomb_packapunch_pc3_anim , "normal", %root, n_rate, n_blend, n_lerp, n_start_time);
// model SetAnim( %fxanim_zom_tomb_packapunch_pc3_anim );
break;
case 4:
model AnimScripted( str_notify, model.origin, model.angles, %fxanim_zom_tomb_packapunch_pc4_anim , "normal", %root, n_rate, n_blend, n_lerp, n_start_time);
// model SetAnim( %fxanim_zom_tomb_packapunch_pc4_anim );
break;
case 5:
model AnimScripted( str_notify, model.origin, model.angles, %fxanim_zom_tomb_packapunch_pc5_anim , "normal", %root, n_rate, n_blend, n_lerp, n_start_time);
// model SetAnim( %fxanim_zom_tomb_packapunch_pc5_anim );
break;
case 6:
model AnimScripted( str_notify, model.origin, model.angles, %fxanim_zom_tomb_packapunch_pc6_anim , "normal", %root, n_rate, n_blend, n_lerp, n_start_time);
// model SetAnim( %fxanim_zom_tomb_packapunch_pc6_anim );
break;
case 7:
model AnimScripted( str_notify, model.origin, model.angles, %fxanim_zom_tomb_packapunch_pc7_anim , "normal", %root, n_rate, n_blend, n_lerp, n_start_time);
// model SetAnim( %fxanim_zom_tomb_packapunch_pc7_anim );
break;
default:
IPrintLnBold("ERROR");
break;
}

}
test_pap();
}
in this test code instead using generators, play an animation on pap model when player fired
as you can see i tried using SetAnim instead Animscripted, but i don't know why, in bo3 doesn't works  :-\
i asked help about Setanim here  but no one replied me  :-(

and here there is a video which shows what anims do but i want anims add on it without clear it after n seconds
and reset only if is called a StopAnimscripted, a ClearAnim or an Animscripted which play the same animation

could someone help me please!
Last Edit: December 28, 2016, 10:26:18 am by jakob9696
broken avatar :(
×
broken avatar :(
Location: nzChristchurch
Date Registered: 8 June 2014
Last active: 6 years ago
Posts
77
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Can I do this?
Signature
×
IDontEvenKnow's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
What I understand here is your somewhat bitching about how PAP is resetting every time you shoot it?

If that's the case, maybe use SetModel() on it to set it to the model of the completed piece, so the model looks more complete and the Anims keep playing?
broken avatar :(
×
broken avatar :(
Location: it
Date Registered: 18 August 2015
Last active: 4 years ago
Posts
78
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Call me jjakob and not jakob9696 ;)
×
jakob9696's Groups
jakob9696's Contact & Social Linksjjakobjjakob9696
i "fixed" it using SetAnim on client side

 
Loading ...