Re: [hlcoders] Player animation after major change in codes.
problem as you have described it seems to be that it's not playing the correct sequence. Like Marteen said, type in cl_showanimstate 1 and look at what is being played... - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 12:21 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] In sdk_playeranimstate.cpp #define ANIM_TOPSPEED_WALK 100 #define ANIM_TOPSPEED_RUN 250 #define ANIM_TOPSPEED_RUN_CROUCH 85 I tried changing the values from 100 to 300, 250 to 1000, but there wasn't any difference made. On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: your blendwidth parameters are default. Look at the same output of cl_showanimstate 1. At the bottom it should show you your move_x pose parameter, I suspect it's at 0.24 too. Then look in the code why it is at 0.24. I'm not sure where it's calculated ( in the engine ? ) but based on a comment line it looks like it's a division of your current speed and CBasePlayerAnimState::GetCurrentMaxGroundSpeed(). Basically, as minh said, your player is running with a speed that is 24 percent of what your code says is it's maximal speed. Fix that, and the anim should play properly. [ Look at the implementation of GetCurrentMaxGroundSpeed() if I'm not mistaken, there's some constants in there you may want to modify for your mod ] -- [ Picked text/plain from multipart/alternative ] // Output .MDL $modelname player/man/man.mdl // Directory of .TGA $cdmaterials models/player/man //Model Properties $origin 0 0 -35 $scale 0.9 $model man man_ref.smd $surfaceprop flesh //- // Reference (this should be your ragdoll pose or delta) //- $sequence reference man_ref //- // Idles //- $sequence Idle man_ref loop fps 20 activity ACT_IDLE 1 //--- // jump //--- $sequence jump man_jump fps 30 alignto Idle activity ACT_HOP -1 $sequence jump2 man_jump fps 30 alignto Idle activity ACT_JUMP -1 //- // Run //- $animation a_RunS runS startloop 0 LX LY alignto Idle rotateto -180 $animation a_RunSE runSE startloop 0 LX LY alignto Idle rotateto -135 $animation a_RunE runE startloop 0 LX LY alignto Idle rotateto -90 $animation a_RunNE runNE startloop 0 LX LY alignto Idle rotateto -45 $animation a_RunN runN startloop 0 LX LY alignto Idle rotateto 0 $animation a_RunNW runNW startloop 0 LX LY alignto Idle rotateto 45 $animation a_RunW runW startloop 0 LX LY alignto Idle rotateto 90 $animation a_RunSW runSW startloop 0 LX LY alignto Idle rotateto 135 $animation a_RunZero man_run loop $sequence Run { a_RunNW a_RunN a_RunNE a_RunW a_RunZero a_RunE a_RunSW a_RunS a_RunSE blendwidth 3 blend move_y -1 1 blend move_x 1 -1 loop ACT_RUN 1 { event 7002 15 lfoot } { event 7002 4 rfoot } } this is my .qc file. The blend is followed from the player_shared.qc On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: At full forward you'd want your weight of the forward anim to be 1.0. It's not the weightlist, those modulate the weight per bone afterwards, the problem here is sooner. It's related to eg blendwidth 3 blend move_y -1 1 blend move_x 1 -1 loop in your qc. The next step in your debugging is seeing why the weight of the anim is 0.24. You should look at the move_x pose parameter. Similarly, you want it to be 1.0 when running forward. If it is at 1.0, then that means you should look at your .qc values and you're doing something wrong there. If it is not at 1.0, which I expect (it's probably at 0.24 itself), then you should indeed look at your runspeeds and how the move_x poseparam is computed. Either modify your move speed, or modify the calculation of the move_x parameter so it reflects what you want. hth, -- Maarten -- [ Picked text/plain from multipart/alternative ] when i press W run forward, the weight is 0.24, so i guess thats where the problem lies? how do i change the weights? On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] $weightlist in the .qc file has little to do with your problem right now.. You're problem as you have described it seems to be that it's not playing the correct sequence. Like Marteen said, type in cl_showanimstate 1 and look at what is being played... - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 12:21 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus
Re: [hlcoders] Player animation after major change in codes.
] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through
Re: [hlcoders] Player animation after major change in codes.
use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through to change the codes, now I cant seem to get him back. After this major change in the codes, i changed the player's animation to a 9way blend, it seems to work, but not totally. The running animations dun work out totally, as in instead of running, they were like walking very small steps. And also the jump animations doesn't work anymore. Does anyone knows the problem? Is it that we missed out some codes? -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through to change the codes, now I cant seem to get him back. After this major change in the codes, i changed the player's animation to a 9way blend, it seems to work, but not totally. The running animations dun work out totally, as in instead of running, they were like walking very small steps. And also the jump animations doesn't work anymore. Does anyone knows the problem? Is it that we missed out some codes? -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] when i press W run forward, the weight is 0.24, so i guess thats where the problem lies? how do i change the weights? On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] $weightlist in the .qc file has little to do with your problem right now.. You're problem as you have described it seems to be that it's not playing the correct sequence. Like Marteen said, type in cl_showanimstate 1 and look at what is being played... - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 12:21 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] ok, you're probably not moving fast enough.. type sv_maxspeed 600 and then move forward... That should change the weight.. If it does, then your problem is something I can help you with... Lemme know what the new weight is. hmm.. why dont u add me to MSN, I can probably help you much quicker.. My MSN contact is [EMAIL PROTECTED] - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 1:00 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] when i press W run forward, the weight is 0.24, so i guess thats where the problem lies? how do i change the weights? On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] $weightlist in the .qc file has little to do with your problem right now.. You're problem as you have described it seems to be that it's not playing the correct sequence. Like Marteen said, type in cl_showanimstate 1 and look at what is being played... - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 12:21 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof
Re: [hlcoders] Player animation after major change in codes.
At full forward you'd want your weight of the forward anim to be 1.0. It's not the weightlist, those modulate the weight per bone afterwards, the problem here is sooner. It's related to eg blendwidth 3 blend move_y -1 1 blend move_x 1 -1 loop in your qc. The next step in your debugging is seeing why the weight of the anim is 0.24. You should look at the move_x pose parameter. Similarly, you want it to be 1.0 when running forward. If it is at 1.0, then that means you should look at your .qc values and you're doing something wrong there. If it is not at 1.0, which I expect (it's probably at 0.24 itself), then you should indeed look at your runspeeds and how the move_x poseparam is computed. Either modify your move speed, or modify the calculation of the move_x parameter so it reflects what you want. hth, -- Maarten -- [ Picked text/plain from multipart/alternative ] when i press W run forward, the weight is 0.24, so i guess thats where the problem lies? how do i change the weights? On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] $weightlist in the .qc file has little to do with your problem right now.. You're problem as you have described it seems to be that it's not playing the correct sequence. Like Marteen said, type in cl_showanimstate 1 and look at what is being played... - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 12:21 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] // Output .MDL $modelname player/man/man.mdl // Directory of .TGA $cdmaterials models/player/man //Model Properties $origin 0 0 -35 $scale 0.9 $model man man_ref.smd $surfaceprop flesh //- // Reference (this should be your ragdoll pose or delta) //- $sequence reference man_ref //- // Idles //- $sequence Idle man_ref loop fps 20 activity ACT_IDLE 1 //--- // jump //--- $sequence jump man_jump fps 30 alignto Idle activity ACT_HOP -1 $sequence jump2 man_jump fps 30 alignto Idle activity ACT_JUMP -1 //- // Run //- $animation a_RunS runS startloop 0 LX LY alignto Idle rotateto -180 $animation a_RunSE runSE startloop 0 LX LY alignto Idle rotateto -135 $animation a_RunE runE startloop 0 LX LY alignto Idle rotateto -90 $animation a_RunNE runNE startloop 0 LX LY alignto Idle rotateto -45 $animation a_RunN runN startloop 0 LX LY alignto Idle rotateto 0 $animation a_RunNW runNW startloop 0 LX LY alignto Idle rotateto 45 $animation a_RunW runW startloop 0 LX LY alignto Idle rotateto 90 $animation a_RunSW runSW startloop 0 LX LY alignto Idle rotateto 135 $animation a_RunZero man_run loop $sequence Run { a_RunNW a_RunN a_RunNE a_RunW a_RunZero a_RunE a_RunSW a_RunS a_RunSE blendwidth 3 blend move_y -1 1 blend move_x 1 -1 loop ACT_RUN 1 { event 7002 15 lfoot } { event 7002 4 rfoot } } this is my .qc file. The blend is followed from the player_shared.qc On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: At full forward you'd want your weight of the forward anim to be 1.0. It's not the weightlist, those modulate the weight per bone afterwards, the problem here is sooner. It's related to eg blendwidth 3 blend move_y -1 1 blend move_x 1 -1 loop in your qc. The next step in your debugging is seeing why the weight of the anim is 0.24. You should look at the move_x pose parameter. Similarly, you want it to be 1.0 when running forward. If it is at 1.0, then that means you should look at your .qc values and you're doing something wrong there. If it is not at 1.0, which I expect (it's probably at 0.24 itself), then you should indeed look at your runspeeds and how the move_x poseparam is computed. Either modify your move speed, or modify the calculation of the move_x parameter so it reflects what you want. hth, -- Maarten -- [ Picked text/plain from multipart/alternative ] when i press W run forward, the weight is 0.24, so i guess thats where the problem lies? how do i change the weights? On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] $weightlist in the .qc file has little to do with your problem right now.. You're problem as you have described it seems to be that it's not playing the correct sequence. Like Marteen said, type in cl_showanimstate 1 and look at what is being played... - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 12:21 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're in (a) really deep mess/ code-wise :) -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton
Re: [hlcoders] Player animation after major change in codes.
your blendwidth parameters are default. Look at the same output of cl_showanimstate 1. At the bottom it should show you your move_x pose parameter, I suspect it's at 0.24 too. Then look in the code why it is at 0.24. I'm not sure where it's calculated ( in the engine ? ) but based on a comment line it looks like it's a division of your current speed and CBasePlayerAnimState::GetCurrentMaxGroundSpeed(). Basically, as minh said, your player is running with a speed that is 24 percent of what your code says is it's maximal speed. Fix that, and the anim should play properly. [ Look at the implementation of GetCurrentMaxGroundSpeed() if I'm not mistaken, there's some constants in there you may want to modify for your mod ] -- [ Picked text/plain from multipart/alternative ] // Output .MDL $modelname player/man/man.mdl // Directory of .TGA $cdmaterials models/player/man //Model Properties $origin 0 0 -35 $scale 0.9 $model man man_ref.smd $surfaceprop flesh //- // Reference (this should be your ragdoll pose or delta) //- $sequence reference man_ref //- // Idles //- $sequence Idle man_ref loop fps 20 activity ACT_IDLE 1 //--- // jump //--- $sequence jump man_jump fps 30 alignto Idle activity ACT_HOP -1 $sequence jump2 man_jump fps 30 alignto Idle activity ACT_JUMP -1 //- // Run //- $animation a_RunS runS startloop 0 LX LY alignto Idle rotateto -180 $animation a_RunSE runSE startloop 0 LX LY alignto Idle rotateto -135 $animation a_RunE runE startloop 0 LX LY alignto Idle rotateto -90 $animation a_RunNE runNE startloop 0 LX LY alignto Idle rotateto -45 $animation a_RunN runN startloop 0 LX LY alignto Idle rotateto 0 $animation a_RunNW runNW startloop 0 LX LY alignto Idle rotateto 45 $animation a_RunW runW startloop 0 LX LY alignto Idle rotateto 90 $animation a_RunSW runSW startloop 0 LX LY alignto Idle rotateto 135 $animation a_RunZero man_run loop $sequence Run { a_RunNW a_RunN a_RunNE a_RunW a_RunZero a_RunE a_RunSW a_RunS a_RunSE blendwidth 3 blend move_y -1 1 blend move_x 1 -1 loop ACT_RUN 1 { event 7002 15 lfoot } { event 7002 4 rfoot } } this is my .qc file. The blend is followed from the player_shared.qc On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: At full forward you'd want your weight of the forward anim to be 1.0. It's not the weightlist, those modulate the weight per bone afterwards, the problem here is sooner. It's related to eg blendwidth 3 blend move_y -1 1 blend move_x 1 -1 loop in your qc. The next step in your debugging is seeing why the weight of the anim is 0.24. You should look at the move_x pose parameter. Similarly, you want it to be 1.0 when running forward. If it is at 1.0, then that means you should look at your .qc values and you're doing something wrong there. If it is not at 1.0, which I expect (it's probably at 0.24 itself), then you should indeed look at your runspeeds and how the move_x poseparam is computed. Either modify your move speed, or modify the calculation of the move_x parameter so it reflects what you want. hth, -- Maarten -- [ Picked text/plain from multipart/alternative ] when i press W run forward, the weight is 0.24, so i guess thats where the problem lies? how do i change the weights? On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] $weightlist in the .qc file has little to do with your problem right now.. You're problem as you have described it seems to be that it's not playing the correct sequence. Like Marteen said, type in cl_showanimstate 1 and look at what is being played... - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Wednesday, December 26, 2007 12:21 AM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] so by using the command $weightlist in the .qc? On 12/26/07, Maarten De Meyer [EMAIL PROTECTED] wrote: use cl_showanimstate 1 ( or something similar, I've become too dependent on auto-completion :D ) when you're alone, on a local server, in thirdperson. On the top right you'll see the list of all animations that are being blended at the moment, plus, important, the weight they're being blended with. Verify e.g. that when you're running straight forward, you're playing the run forward animation with weight 1.0. If that's not the case, there's your bug already, it's probably badly set up pose parameters in the .qc. If it is playing with weight 1.0 and your run animation in max does not correspond to what the character is doing, you either have a problem during export or in the .qc, or you're
[hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through to change the codes, now I cant seem to get him back. After this major change in the codes, i changed the player's animation to a 9way blend, it seems to work, but not totally. The running animations dun work out totally, as in instead of running, they were like walking very small steps. And also the jump animations doesn't work anymore. Does anyone knows the problem? Is it that we missed out some codes? -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through to change the codes, now I cant seem to get him back. After this major change in the codes, i changed the player's animation to a 9way blend, it seems to work, but not totally. The running animations dun work out totally, as in instead of running, they were like walking very small steps. And also the jump animations doesn't work anymore. Does anyone knows the problem? Is it that we missed out some codes? -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through to change the codes, now I cant seem to get him back. After this major change in the codes, i changed the player's animation to a 9way blend, it seems to work, but not totally. The running animations dun work out totally, as in instead of running, they were like walking very small steps. And also the jump animations doesn't work anymore. Does anyone knows the problem? Is it that we missed out some codes? -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through to change the codes, now I cant seem to get him back. After this major change in the codes, i changed the player's animation to a 9way blend, it seems to work, but not totally. The running animations dun work out totally, as in instead of running, they were like walking very small steps. And also the jump animations doesn't work anymore. Does anyone knows the problem? Is it that we missed out some codes? -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player animation after major change in codes.
-- [ Picked text/plain from multipart/alternative ] Hmm.. you might try investigating this function Activity CSDKPlayerAnimState::CalcMainActivity() It returns what activity to play based on certain parameters. Make sure that it's returning the activity you want it to.. You can do this by adding a code break, or you can do this by spitting out a message to the screen to determine what activity is being returned. This is how I spit out messages to the screen. engine-Con_NPrintf ( iLine, %i, idealActivity ); iLine is the line on the screen where it will spit out. I think valid values range from 0 - 60. idealActivity is the activity number. You should put this line at the end of the ::CalcMainActivity() function .. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 8:05 PM Subject: Re: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] Not only the jump animation. The run animation is working, but not totally. The animation is supposed to be a run, but when WASD is pressed, the animation in game is just taking small steps. On 12/26/07, Minh [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] ok, I'm sorry but spewing out everything you've done since you were born doesn't make it any easier for us to decipher what the problem is... If the jumping stuff isn't working, try finding out what exactly happens when you press the jump key. Go to sdk_gamemovement.cpp and look for a function called CheckJumpButton Investigage what that function is doing and maybe it will lead you to why your jump animatons aren't working. - Original Message - From: Alvin Ng [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Tuesday, December 25, 2007 7:00 PM Subject: [hlcoders] Player animation after major change in codes. -- [ Picked text/plain from multipart/alternative ] On client side, added existing items in HL2 DLL Folder: c_sdk_player.h c_sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp On server side, added existing items in HL2 DLL Folder: sdk_player.h sdk_player.cpp sdk_playeranimatestate.h sdk_playeranimatestate.cpp sdk_player_shared.cpp -- replaced: #include sdk/sdk_player.h with #include sdk/sdk_playeranimstate.h *In sdk_playeranimatestate.h, sdk_player.cpp, sdk_player_shared.cpp replaced: WeaponSDKBase with BaseHLCombat Weapon e.g. C_WeaponSDKBase willl be C_BaseHLCombat Weapon replaced: #include sdk_gamerules.h with #include hl2_gamerules.h #include weapon_sdkbase.h with #include basehl2combatweapon_shared.h *In hl2_player.cpp comment LINK_ENTITY_TO_CLASS( player, CHL2_Player ); e.g. // LINK_ENTITY_TO_CLASS( player, CHL2_Player ); *In sdk_playeranimatestate.cpp replaced: #include weapon_sdkbase.h with #include basehlcombatweapon_shared.h *In the entire project replaced: GetSDKWpnData with GetWpnData *In weapon_parse.cpp -=added: const char *pAnimEx = pKeyValuesData-GetString( PlayerAnimationExtension, mp5 ); Q_strncpy( m_szAnimExtension, pAnimEx, sizeof( m_szAnimExtension ) ); -=in the function=- void FileWeaponInfo_t: arse *In weapon_parse.h added: char m_szAnimExtension[16]; // string used to generate player animations with this weapon *In sdk_player.cpp , sdk_player.h commented function with CheatImpulseCommands *In c_sdk_player.cpp replaced: #include weapon_parse.h with #include basehlcombatweapon_shared.h *In c_sdk_player.h Find and replace first two C_BasePlayer: C_BasePlayer with C_BaseHLPlayer and added: #include c_basehlplayer.h *On the server side in sdk_player.h replaced: CBasePlayer with CHL2_Player and included: #include hl2_player.h --- We got a help from this coder, he walked us through to change the codes, now I cant seem to get him back. After this major change in the codes, i changed the player's animation to a 9way blend, it seems to work, but not totally. The running animations dun work out totally, as in instead of running, they were like walking very small steps. And also the jump animations doesn't work anymore. Does anyone knows the problem? Is it that we missed out some codes? -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http
Re: [hlcoders] Player animation ?
Thank you both for finally replying to this specific question-- there have been two threads (that I know of previously) that dealt with this same issue. =) On Tue, 11 Jan 2005 14:21:05 -0800, Adrian Finol [EMAIL PROTECTED] wrote: Actually, it looks like he's not loading the HL2DM models but the HL2 ones. In HL2DM Humans and Combine share the same animations. Make sure you are loading from the right *_animations.mdl animation files. Both set of models should have the same animation and activity names. Other than that Major Boone speaks the truth. Using the Weapon's activity translation table is the cleanest way to handle different animations per weapon. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Boone Sent: Tuesday, January 11, 2005 2:05 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Player animation ? HL2DM player animation uses a different system than is in the sdk. Basically you have a list of base sequences, preblended with 9-way aims and 9-way runs - those are the aim animations and are called in game code via activities ( why you see different animation names in combine vs rebels ). Shooting is done by adding the fire animation as a gesture over top of the base sequence. For Dod we're doing a hybird, with the activities on base sequence and fire/reload/hand signal gestures over top, but non-networked like the sdk does it to reduce net traffic. I would recommend moving at least to using activities for your player animations so avoid all the nasty string construction and comparing. As far as your animations only playing the first and last frame, this function doesn't appear to be causing that. I would check with a a different model/sequence to see if it's a problem in your model. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Flanagan Sent: Tuesday, January 11, 2005 11:33 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Player animation ? I'm trying to get player animation working with some non-CS models. Specifically, I'd like to get animations working with the models used in HL2DM. I used model viewer to load up the combine models from HL2DM and some of the resistance models from HL2DM. Not only are their animations totally different from CS, they're different from each other. The combine models have different animations than the resistance models. I've been working on converting the animation names in sdk_playeranimstate.cpp to call the animations in combine_solder.mdl, which I think is the one used in HL2DM. I've run into some problems with this though. First off, there's doesn't seem to be any walking or running shooting animations. There are animations like ShootSGs, ShootSGc, ShootSMG1s, ShootSMG1c, etc but there's no walk_upper_mp5 or run_upper_mp5 like in the CS models. There doesn't seem to be any animation to be running and shooting at the same time. Second, the animations seem to only play the first frame and then stop. For example, I changed CalcFireLayerSequence to look like this: int CSDKPlayerAnimState::CalcFireLayerSequence(PlayerAnimEvent_t event) { // Figure out the weapon suffix. CWeaponSDKBase *pWeapon = m_pHelpers-SDKAnim_GetActiveWeapon(); if ( !pWeapon ) return 0; const char *pSuffix = GetWeaponSuffix(); if ( !pSuffix ) return 0; // Don't rely on their weapon here because the player has usually switched to their // pistol or rifle by the time the PLAYERANIMEVENT_THROW_GRENADE message gets to the client. if ( event == PLAYERANIMEVENT_THROW_GRENADE ) { pSuffix = Gren; } switch ( GetCurrentMainSequenceActivity() ) { case ACT_PLAYER_RUN_FIRE: case ACT_RUN: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_RUN_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_WALK_FIRE: case ACT_WALK: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_WALK_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_CROUCH_FIRE: case ACT_CROUCHIDLE: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_NAME, pSuffix ); case ACT_PLAYER_CROUCH_WALK_FIRE: case ACT_RUN_CROUCH: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_WALK_NAME, pSuffix ); default: case ACT_PLAYER_IDLE_FIRE: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_IDLE_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME
Re: [hlcoders] Player animation ? Interesant Discussion
Using Matt's suggestions, I was able to get a HL2DM model animating in my code. Turns out I was in fact loading the wrong model animations file. On Tue, 11 Jan 2005 23:45:26 -0700, Jose Luis Gonzalez [EMAIL PROTECTED] wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] This is interesant. Can we use the HL2DM models in the SDK?. What is the correct way to do?, cloning the HL2DM weapons to the SDK and using the animation layer sequences of the HL2DM??. Looking in the Model viewer, a lot of models have the weapon activity sequences, like GMAN. Can we use this model with the SDK, for example?. This code is the correct way to do the animation sequences??. Can you post an example using a HL2 model or a HL2DM model ??. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] ] On Behalf Of Adrian Finol Sent: Tuesday, January 11, 2005 2:05 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Player animation ? Actually, it looks like he's not loading the HL2DM models but the HL2 ones. In HL2DM Humans and Combine share the same animations. Make sure you are loading from the right *_animations.mdl animation files. Both set of models should have the same animation and activity names. Other than that Major Boone speaks the truth. Using the Weapon's activity translation table is the cleanest way to handle different animations per weapon. -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] ] On Behalf Of Matt Boone Sent: Tuesday, January 11, 2005 2:05 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Player animation ? HL2DM player animation uses a different system than is in the sdk. Basically you have a list of base sequences, preblended with 9-way aims and 9-way runs - those are the aim animations and are called in game code via activities ( why you see different animation names in combine vs rebels ). Shooting is done by adding the fire animation as a gesture over top of the base sequence. For Dod we're doing a hybird, with the activities on base sequence and fire/reload/hand signal gestures over top, but non-networked like the sdk does it to reduce net traffic. I would recommend moving at least to using activities for your player animations so avoid all the nasty string construction and comparing. As far as your animations only playing the first and last frame, this function doesn't appear to be causing that. I would check with a a different model/sequence to see if it's a problem in your model. -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] ] On Behalf Of Patrick Flanagan Sent: Tuesday, January 11, 2005 11:33 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Player animation ? I'm trying to get player animation working with some non-CS models. Specifically, I'd like to get animations working with the models used in HL2DM. I used model viewer to load up the combine models from HL2DM and some of the resistance models from HL2DM. Not only are their animations totally different from CS, they're different from each other. The combine models have different animations than the resistance models. I've been working on converting the animation names in sdk_playeranimstate.cpp to call the animations in combine_solder.mdl, which I think is the one used in HL2DM. I've run into some problems with this though. First off, there's doesn't seem to be any walking or running shooting animations. There are animations like ShootSGs, ShootSGc, ShootSMG1s, ShootSMG1c, etc but there's no walk_upper_mp5 or run_upper_mp5 like in the CS models. There doesn't seem to be any animation to be running and shooting at the same time. Second, the animations seem to only play the first frame and then stop. For example, I changed CalcFireLayerSequence to look like this: int CSDKPlayerAnimState::CalcFireLayerSequence(PlayerAnimEvent_t event) { // Figure out the weapon suffix. CWeaponSDKBase *pWeapon = m_pHelpers-SDKAnim_GetActiveWeapon(); if ( !pWeapon ) return 0; const char *pSuffix = GetWeaponSuffix(); if ( !pSuffix ) return 0; // Don't rely on their weapon here because the player has usually switched to their // pistol or rifle by the time the PLAYERANIMEVENT_THROW_GRENADE message gets to the client. if ( event == PLAYERANIMEVENT_THROW_GRENADE ) { pSuffix = Gren; } switch ( GetCurrentMainSequenceActivity() ) { case ACT_PLAYER_RUN_FIRE: case ACT_RUN: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_RUN_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_WALK_FIRE: case ACT_WALK: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_WALK_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_CROUCH_FIRE: case ACT_CROUCHIDLE: return CalcSequenceIndex( %s%s
[hlcoders] Player animation ?
I'm trying to get player animation working with some non-CS models. Specifically, I'd like to get animations working with the models used in HL2DM. I used model viewer to load up the combine models from HL2DM and some of the resistance models from HL2DM. Not only are their animations totally different from CS, they're different from each other. The combine models have different animations than the resistance models. I've been working on converting the animation names in sdk_playeranimstate.cpp to call the animations in combine_solder.mdl, which I think is the one used in HL2DM. I've run into some problems with this though. First off, there's doesn't seem to be any walking or running shooting animations. There are animations like ShootSGs, ShootSGc, ShootSMG1s, ShootSMG1c, etc but there's no walk_upper_mp5 or run_upper_mp5 like in the CS models. There doesn't seem to be any animation to be running and shooting at the same time. Second, the animations seem to only play the first frame and then stop. For example, I changed CalcFireLayerSequence to look like this: int CSDKPlayerAnimState::CalcFireLayerSequence(PlayerAnimEvent_t event) { // Figure out the weapon suffix. CWeaponSDKBase *pWeapon = m_pHelpers-SDKAnim_GetActiveWeapon(); if ( !pWeapon ) return 0; const char *pSuffix = GetWeaponSuffix(); if ( !pSuffix ) return 0; // Don't rely on their weapon here because the player has usually switched to their // pistol or rifle by the time the PLAYERANIMEVENT_THROW_GRENADE message gets to the client. if ( event == PLAYERANIMEVENT_THROW_GRENADE ) { pSuffix = Gren; } switch ( GetCurrentMainSequenceActivity() ) { case ACT_PLAYER_RUN_FIRE: case ACT_RUN: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_RUN_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_WALK_FIRE: case ACT_WALK: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_WALK_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_CROUCH_FIRE: case ACT_CROUCHIDLE: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_NAME, pSuffix ); case ACT_PLAYER_CROUCH_WALK_FIRE: case ACT_RUN_CROUCH: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_WALK_NAME, pSuffix ); default: case ACT_PLAYER_IDLE_FIRE: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_IDLE_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: pick the right weapon } } I've set my player model to be combine_soldier. When I spawn in third person and watch my player model, if I run along start shooting it looks like it plays only the first frame or two and then immediately goes back to idle/jittering. If I'm running, it looks even worse since each time I fire it looks like it restarts the ShootSMG1animation but there's no blending between them so it looks all jittery. Has anyone had any luck getting this to work? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Player animation ?
HL2DM player animation uses a different system than is in the sdk. Basically you have a list of base sequences, preblended with 9-way aims and 9-way runs - those are the aim animations and are called in game code via activities ( why you see different animation names in combine vs rebels ). Shooting is done by adding the fire animation as a gesture over top of the base sequence. For Dod we're doing a hybird, with the activities on base sequence and fire/reload/hand signal gestures over top, but non-networked like the sdk does it to reduce net traffic. I would recommend moving at least to using activities for your player animations so avoid all the nasty string construction and comparing. As far as your animations only playing the first and last frame, this function doesn't appear to be causing that. I would check with a a different model/sequence to see if it's a problem in your model. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Flanagan Sent: Tuesday, January 11, 2005 11:33 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Player animation ? I'm trying to get player animation working with some non-CS models. Specifically, I'd like to get animations working with the models used in HL2DM. I used model viewer to load up the combine models from HL2DM and some of the resistance models from HL2DM. Not only are their animations totally different from CS, they're different from each other. The combine models have different animations than the resistance models. I've been working on converting the animation names in sdk_playeranimstate.cpp to call the animations in combine_solder.mdl, which I think is the one used in HL2DM. I've run into some problems with this though. First off, there's doesn't seem to be any walking or running shooting animations. There are animations like ShootSGs, ShootSGc, ShootSMG1s, ShootSMG1c, etc but there's no walk_upper_mp5 or run_upper_mp5 like in the CS models. There doesn't seem to be any animation to be running and shooting at the same time. Second, the animations seem to only play the first frame and then stop. For example, I changed CalcFireLayerSequence to look like this: int CSDKPlayerAnimState::CalcFireLayerSequence(PlayerAnimEvent_t event) { // Figure out the weapon suffix. CWeaponSDKBase *pWeapon = m_pHelpers-SDKAnim_GetActiveWeapon(); if ( !pWeapon ) return 0; const char *pSuffix = GetWeaponSuffix(); if ( !pSuffix ) return 0; // Don't rely on their weapon here because the player has usually switched to their // pistol or rifle by the time the PLAYERANIMEVENT_THROW_GRENADE message gets to the client. if ( event == PLAYERANIMEVENT_THROW_GRENADE ) { pSuffix = Gren; } switch ( GetCurrentMainSequenceActivity() ) { case ACT_PLAYER_RUN_FIRE: case ACT_RUN: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_RUN_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_WALK_FIRE: case ACT_WALK: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_WALK_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_CROUCH_FIRE: case ACT_CROUCHIDLE: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_NAME, pSuffix ); case ACT_PLAYER_CROUCH_WALK_FIRE: case ACT_RUN_CROUCH: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_WALK_NAME, pSuffix ); default: case ACT_PLAYER_IDLE_FIRE: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_IDLE_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: pick the right weapon } } I've set my player model to be combine_soldier. When I spawn in third person and watch my player model, if I run along start shooting it looks like it plays only the first frame or two and then immediately goes back to idle/jittering. If I'm running, it looks even worse since each time I fire it looks like it restarts the ShootSMG1animation but there's no blending between them so it looks all jittery. Has anyone had any luck getting this to work? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Player animation ? Interesant Discussion
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] This is interesant. Can we use the HL2DM models in the SDK?. What is the correct way to do?, cloning the HL2DM weapons to the SDK and using the animation layer sequences of the HL2DM??. Looking in the Model viewer, a lot of models have the weapon activity sequences, like GMAN. Can we use this model with the SDK, for example?. This code is the correct way to do the animation sequences??. Can you post an example using a HL2 model or a HL2DM model ??. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] ] On Behalf Of Adrian Finol Sent: Tuesday, January 11, 2005 2:05 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Player animation ? Actually, it looks like he's not loading the HL2DM models but the HL2 ones. In HL2DM Humans and Combine share the same animations. Make sure you are loading from the right *_animations.mdl animation files. Both set of models should have the same animation and activity names. Other than that Major Boone speaks the truth. Using the Weapon's activity translation table is the cleanest way to handle different animations per weapon. -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] ] On Behalf Of Matt Boone Sent: Tuesday, January 11, 2005 2:05 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] Player animation ? HL2DM player animation uses a different system than is in the sdk. Basically you have a list of base sequences, preblended with 9-way aims and 9-way runs - those are the aim animations and are called in game code via activities ( why you see different animation names in combine vs rebels ). Shooting is done by adding the fire animation as a gesture over top of the base sequence. For Dod we're doing a hybird, with the activities on base sequence and fire/reload/hand signal gestures over top, but non-networked like the sdk does it to reduce net traffic. I would recommend moving at least to using activities for your player animations so avoid all the nasty string construction and comparing. As far as your animations only playing the first and last frame, this function doesn't appear to be causing that. I would check with a a different model/sequence to see if it's a problem in your model. -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] ] On Behalf Of Patrick Flanagan Sent: Tuesday, January 11, 2005 11:33 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Player animation ? I'm trying to get player animation working with some non-CS models. Specifically, I'd like to get animations working with the models used in HL2DM. I used model viewer to load up the combine models from HL2DM and some of the resistance models from HL2DM. Not only are their animations totally different from CS, they're different from each other. The combine models have different animations than the resistance models. I've been working on converting the animation names in sdk_playeranimstate.cpp to call the animations in combine_solder.mdl, which I think is the one used in HL2DM. I've run into some problems with this though. First off, there's doesn't seem to be any walking or running shooting animations. There are animations like ShootSGs, ShootSGc, ShootSMG1s, ShootSMG1c, etc but there's no walk_upper_mp5 or run_upper_mp5 like in the CS models. There doesn't seem to be any animation to be running and shooting at the same time. Second, the animations seem to only play the first frame and then stop. For example, I changed CalcFireLayerSequence to look like this: int CSDKPlayerAnimState::CalcFireLayerSequence(PlayerAnimEvent_t event) { // Figure out the weapon suffix. CWeaponSDKBase *pWeapon = m_pHelpers-SDKAnim_GetActiveWeapon(); if ( !pWeapon ) return 0; const char *pSuffix = GetWeaponSuffix(); if ( !pSuffix ) return 0; // Don't rely on their weapon here because the player has usually switched to their // pistol or rifle by the time the PLAYERANIMEVENT_THROW_GRENADE message gets to the client. if ( event == PLAYERANIMEVENT_THROW_GRENADE ) { pSuffix = Gren; } switch ( GetCurrentMainSequenceActivity() ) { case ACT_PLAYER_RUN_FIRE: case ACT_RUN: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_RUN_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_WALK_FIRE: case ACT_WALK: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_WALK_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s ); //FIXME: totally wrong case ACT_PLAYER_CROUCH_FIRE: case ACT_CROUCHIDLE: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_NAME, pSuffix ); case ACT_PLAYER_CROUCH_WALK_FIRE: case ACT_RUN_CROUCH: return CalcSequenceIndex( %s%s, DEFAULT_FIRE_CROUCH_WALK_NAME, pSuffix ); default: case ACT_PLAYER_IDLE_FIRE: //return CalcSequenceIndex( %s%s, DEFAULT_FIRE_IDLE_NAME, pSuffix ); return CalcSequenceIndex( ShootSMG1s