Raised This Month: $318 Target: $400
 79%   Almost there!

New Animations Along With Models?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AnimalMonster
Senior Member
Join Date: May 2020
Old 11-20-2021 , 12:54   New Animations Along With Models?
Reply With Quote #1

Hey, i've got a question
SO.. When you set a p_ model to a player, does it or does it not add new animations along with it? I recently questioned myself "What is this 'ANIM_EXTENSION' define in KORD's code" and now i'm trying to figure it out + How can i find what the new 'animation extension' of the new p_ model is ?

Last edited by AnimalMonster; 11-20-2021 at 12:55.
AnimalMonster is offline
hellmoss
Senior Member
Join Date: Oct 2009
Location: Bulgaria
Old 11-20-2021 , 13:50   Re: New Animations Along With Models?
Reply With Quote #2

You need to add new anims to the player model in models/player. You can't add new anims through the p_ model from models/* because those are managed by the skeleton.
__________________
Quote:
Originally Posted by Kakarot47 View Post
There is no bug. with 100% gurenty
hellmoss is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-20-2021 , 16:38   Re: New Animations Along With Models?
Reply With Quote #3

the p_weapon model has no animations are you talking about the player model animation?
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 11-20-2021 at 16:38.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
AnimalMonster
Senior Member
Join Date: May 2020
Old 11-27-2021 , 12:02   Re: New Animations Along With Models?
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
the p_weapon model has no animations are you talking about the player model animation?
Yeah, i've seen something in T3rkecorejz's take on Stormgiant Warhammer where he has something like this:
Code:
static szAnimation[32]; 
format(szAnimation, charsmax(szAnimation), pev(pPlayer, pev_flags) & FL_DUCKING ? "crouch_shoot_%s" : "ref_shoot_%s", STORMGIANT_PLAYER_SEQUENCE);
UTIL_PlayerAnimation(pPlayer, szAnimation, 93.0); // Note: STORMGIANT_PLAYER_SEQUENCE is "skullaxe"
Code:
public UTIL_PlayerAnimation(pPlayer, szAnimation[], Float:iFrame) { // By KORD_12.7
	static iAnimDesired, Float:flFrameRate, Float:flGroundSpeed, bool:bLoops;
	if((iAnimDesired = lookup_sequence(pPlayer, szAnimation, flFrameRate, bLoops, flGroundSpeed)) == -1) iAnimDesired = 0;
	static Float:flGameTime; flGameTime = get_gametime();
	
	set_pev(pPlayer, pev_frame, iFrame);
        set_pev(pPlayer, pev_framerate, 1.0);
        set_pev(pPlayer, pev_animtime, flGameTime);
        set_pev(pPlayer, pev_sequence, iAnimDesired);
	
	set_pdata_int(pPlayer, m_fSequenceLoops, bLoops, 4);
        set_pdata_int(pPlayer, m_fSequenceFinished, 0, 4);
        set_pdata_float(pPlayer, m_flFrameRate, flFrameRate, 4);
        set_pdata_float(pPlayer, m_flGroundSpeed, flGroundSpeed, 4);
        set_pdata_float(pPlayer, m_flLastEventCheck, flGameTime, 4);
        set_pdata_int(pPlayer, m_Activity, ACT_RANGE_ATTACK1, 5);
        set_pdata_int(pPlayer, m_IdealActivity, ACT_RANGE_ATTACK1, 5);  
        set_pdata_float(pPlayer, m_flLastAttackTime, flGameTime, 5);
}

// ACT_RANGE_ATTACK1 is 28
And then i started asking myself up about this and how it is possible so i came to the conclusion that whenever a new p_ model is added to the player it adds along with it new player animation for the model.
AnimalMonster is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 11-27-2021 , 14:58   Re: New Animations Along With Models?
Reply With Quote #5

yes, you can create a new animations for the player model without the need of changing the player model instead you just change the player model index.
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:59.


Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Theme made by Freecode