[hlcoders] Player Class System
-- [ Picked text/plain from multipart/alternative ] I was wondering how you can implement a player class system like there is in Counter Strike or Counter Strike: Source. It is just pure cosmetics (has no affect on anything such as health, weapon etc. just a different model file). I already have 2 teams so I would just like classes for those 2 teams. I have an image here (I knows its crappy but it should give you the basic idea): http://www.imagehosting.com/show.php/1524455_untitled.bmp.html I also would like to know why every time I press on say the Rebels button when I select a team, I suicide and then I spawn as a rebel. I'm not very good at coding so could you please tell me what to do exactly? Thanks. -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Player Class System
In counter-strike, and DOD, it is simply cosmetic (Except DOD where different classes have different weapons). Kushan Gunasekera wrote -- [ Picked text/plain from multipart/alternative ] I was wondering how you can implement a player class system like there is in Counter Strike or Counter Strike: Source. It is just pure cosmetics (has no affect on anything such as health, weapon etc. just a different model file). I already have 2 teams so I would just like classes for those 2 teams. I have an image here (I knows its crappy but it should give you the basic idea): http://www.imagehosting.com/show.php/1524455_untitled.bmp.html I also would like to know why every time I press on say the Rebels button when I select a team, I suicide and then I spawn as a rebel. I'm not very good at coding so could you please tell me what to do exactly? Thanks. -- ___ 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 Class System
-- [ Picked text/plain from multipart/alternative ] Well, for something simply cosmetic, simply have the user choose through a VGUI menu or whatever, then store their choice in a simple var in the player class, then on spawn, set their model based upon what the # is, example: void CSDKPlayer::Precache() { PrecacheModel( CLASS1MODEL ); ... PrecacheModel(CLASS8MODEL); //2 teams * 4 models BaseClass::Precache(); } void CSDKPlayer::Spawn() { BaseClass::Spawn(); if(GetTeamNumber()==TEAM_FIRSTTEAM||GetTeamNumber()==TEAM_TEAMSECONDTEAM) //No observers getting the custom models. { switch(m_iPlayerClass) //Class variable in the player class { case CLASS_CLASS1: SetModel(CLASS1MODEL ); ... case CLASS_CLASS8: SetModel(CLASS8MODEL); default: SetModel(SOMEOTHERMODEL) } } Hope that helps, was some ripped out and dumbed down code from the mod I'm working on. On Jan 21, 2008 4:45 AM, Kushan Gunasekera [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I was wondering how you can implement a player class system like there is in Counter Strike or Counter Strike: Source. It is just pure cosmetics (has no affect on anything such as health, weapon etc. just a different model file). I already have 2 teams so I would just like classes for those 2 teams. I have an image here (I knows its crappy but it should give you the basic idea): http://www.imagehosting.com/show.php/1524455_untitled.bmp.html I also would like to know why every time I press on say the Rebels button when I select a team, I suicide and then I spawn as a rebel. I'm not very good at coding so could you please tell me what to do exactly? Thanks. -- ___ 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] Replacing NPC_Antlion
Does your animation have the movement in it? In other words when you view it in model viewer with I believe sequence ticked the model should look like it is moving. If it does not then that is the issue. It is a pretty common problem with zombie models if decompiling is attempted. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alvin Ng Sent: Sunday, January 20, 2008 11:15 PM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Replacing NPC_Antlion -- [ Picked text/plain from multipart/alternative ] I am trying to replace the NPC_Antlion with my own model and animations, but the animations dun work... the antlion turns when it detects the player but doesn't move. Anyone know why? -- ___ 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] How do I get $jointconstrain details?
Take a look at the strider model/npc. He is the holy grail of what you are looking for. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of abc def Sent: Sunday, January 20, 2008 10:14 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] How do I get $jointconstrain details? -- [ Picked text/plain from multipart/alternative ] how do i define the bones? using the $jointcontrains? in the hlmv, it shows the hitboxes, but in game, the player still can go through... From: [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] How do I get $jointconstrain details? Date: Sun, 20 Jan 2008 18:53:15 -0800 -- [ Picked text/plain from multipart/alternative ] There's two ways to prevent people from going through your monster: 1) Define a collision box that is big enough to contain your monster. (this is done in code) 2) Define collision boxes for the bones on your monster, and then use the $bonefollowers option in your .qc file . This will allow the player to walk into the nooks and crannies of your monster while preventing him from going through his legs/arms. #1 is easiest method to do. - Original Message - From: abc def [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Sunday, January 20, 2008 6:21 PM Subject: [hlcoders] How do I get $jointconstrain details?-- [ Picked text/plain from multipart/alternative ] I'm new using source, i created a monster, but the collision box is is the center of the model, where my player can just walk through its legs... I wonder if its because I never include the bones in the monster... Plus, how do i get the $jointconstrain details for my bones which i used 3DMAX _ Easily manage multiple email accounts with Windows Live Mail! http://www.get.live.com/wl/all -- ___ 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 _ Help Splitzo Sally Before It's Too Late! http://www.thegirlwhosplitinto5.com/ -- ___ 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 Class System
You need to store a class object for each player which stores all the class specific things you want in your mod. Then when those things are needed you access the values to be used from the player's class object. It also is useful to associate unique gamemovements with your classes if you want to do something like in tf2 how a scout can double jump and others can't, etc. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kushan Gunasekera Sent: Monday, January 21, 2008 4:45 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Player Class System -- [ Picked text/plain from multipart/alternative ] I was wondering how you can implement a player class system like there is in Counter Strike or Counter Strike: Source. It is just pure cosmetics (has no affect on anything such as health, weapon etc. just a different model file). I already have 2 teams so I would just like classes for those 2 teams. I have an image here (I knows its crappy but it should give you the basic idea): http://www.imagehosting.com/show.php/1524455_untitled.bmp.html I also would like to know why every time I press on say the Rebels button when I select a team, I suicide and then I spawn as a rebel. I'm not very good at coding so could you please tell me what to do exactly? Thanks. -- ___ 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] How do I get $jointconstrain details?
It's hard to tell if you are asking two questions or the wrong question. Nothing about $jointconstrain will affect the collisions between players and an AI. So if you really want to author a bunch of $jointconstrain statements to solve some other problem (like say ragdoll motion - which it will affect) you can do that inside hlmv with slides and hit the generate qc button to put the qc for those slider settings on the clipboard. Then just paste it into your qc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Harris Sent: Monday, January 21, 2008 10:19 AM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] How do I get $jointconstrain details? Take a look at the strider model/npc. He is the holy grail of what you are looking for. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of abc def Sent: Sunday, January 20, 2008 10:14 PM To: hlcoders@list.valvesoftware.com Subject: RE: [hlcoders] How do I get $jointconstrain details? -- [ Picked text/plain from multipart/alternative ] how do i define the bones? using the $jointcontrains? in the hlmv, it shows the hitboxes, but in game, the player still can go through... From: [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] How do I get $jointconstrain details? Date: Sun, 20 Jan 2008 18:53:15 -0800 -- [ Picked text/plain from multipart/alternative ] There's two ways to prevent people from going through your monster: 1) Define a collision box that is big enough to contain your monster. (this is done in code) 2) Define collision boxes for the bones on your monster, and then use the $bonefollowers option in your .qc file . This will allow the player to walk into the nooks and crannies of your monster while preventing him from going through his legs/arms. #1 is easiest method to do. - Original Message - From: abc def [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Sunday, January 20, 2008 6:21 PM Subject: [hlcoders] How do I get $jointconstrain details?-- [ Picked text/plain from multipart/alternative ] I'm new using source, i created a monster, but the collision box is is the center of the model, where my player can just walk through its legs... I wonder if its because I never include the bones in the monster... Plus, how do i get the $jointconstrain details for my bones which i used 3DMAX _ Easily manage multiple email accounts with Windows Live Mail! http://www.get.live.com/wl/all -- ___ 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 _ Help Splitzo Sally Before It's Too Late! http://www.thegirlwhosplitinto5.com/ -- ___ 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] Replacing NPC_Antlion
-- [ Picked text/plain from multipart/alternative ] ya.. there's the ACT_RUN, ACT_WALK animation in it, but if i made it able to move, the animation wont play, and if i made it able to play the walk animation, it wont move... On 1/22/08, Christopher Harris [EMAIL PROTECTED] wrote: Does your animation have the movement in it? In other words when you view it in model viewer with I believe sequence ticked the model should look like it is moving. If it does not then that is the issue. It is a pretty common problem with zombie models if decompiling is attempted. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alvin Ng Sent: Sunday, January 20, 2008 11:15 PM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Replacing NPC_Antlion -- [ Picked text/plain from multipart/alternative ] I am trying to replace the NPC_Antlion with my own model and animations, but the animations dun work... the antlion turns when it detects the player but doesn't move. Anyone know why? -- ___ 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] Replacing NPC_Antlion
Well what I means is that the animation needs to have the movement in the animation. I know that the QC the animation with movement needs LX in it. I unfortunately do not know so much on the animation side. I helped with getting a model to work with the vanilla code included for the houndeye. What we found was that we had to have animations that had movement speed imbedded into the animation. So for a walk anim. If you start at 0 and wanted a move speed of 5 per anim loop you would have the end of the animation end up 5 units further. And then in the QC I remember the animator talked about a LX parameter for the animation to let the compiler know this animation has movement in it on the x plane. LY for an animation with Y plane movement I suppose. CHris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alvin Ng Sent: Monday, January 21, 2008 8:25 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Replacing NPC_Antlion -- [ Picked text/plain from multipart/alternative ] ya.. there's the ACT_RUN, ACT_WALK animation in it, but if i made it able to move, the animation wont play, and if i made it able to play the walk animation, it wont move... On 1/22/08, Christopher Harris [EMAIL PROTECTED] wrote: Does your animation have the movement in it? In other words when you view it in model viewer with I believe sequence ticked the model should look like it is moving. If it does not then that is the issue. It is a pretty common problem with zombie models if decompiling is attempted. Chris -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alvin Ng Sent: Sunday, January 20, 2008 11:15 PM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Replacing NPC_Antlion -- [ Picked text/plain from multipart/alternative ] I am trying to replace the NPC_Antlion with my own model and animations, but the animations dun work... the antlion turns when it detects the player but doesn't move. Anyone know why? -- ___ 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 ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Vector math is simply beyond me.
Hello, everybody. I'm having a headache with a model entity I'm writing, and I need your help. To start off, the entity is a turret. It has a model, the model has pitch and yaw pose parameters I use to point the model at the player it's shooting at. That being said, I can't get the math right for the yaw to come out right at all. Here's what I have: * Vector vecAbsOrigin( GetAbsOrigin() ); // the absolute center of the model * QAngle angAbsAngles( GetAbsAngles() ); // the absolute angles of the model * Vector vecPosition; // the absolute position of what's being shot at I've tried everything I know, but I cannot put these three values together in any way that will give me a pitch and yaw for my SetPoseParameter calls that will result in this turret pointing at its target. I'm not versed in vector math, which doesn't help either. Can someone help me out? // Adam Maras (memzero) ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Few questions
Hey guys, Started off with a scratch mod (Needed the CSS Animations), and have the following done and working: Footsteps Player Models Team VGUI Skin VGUI Now i have the issues with the HUD, mainly with the HUD disappearing after someone dies (Get a UserMessage error in the console - failed to send). Also a little bit of a problem with people walking through physics objects. (I'm assuming thats a line of code i'm overlooking within the player class). Any help much appreciated Cheers ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Vector math is simply beyond me.
Setting the pose parameters correctly (so the turret looks like it's aiming at what you want it to aim at) can be a bit tricky. I'd recommend trying to set your turret up like VALVe's carriable floor turret guy as the code is available for it. Here's some code for a ceiling mounted turret we have that can spin 360 degrees. (Note: depending on if you've modified one of the lerp functions you might see a bug when the turret reaches the 360/0 degree mark when rotating from a certain direction - it'll sort of flip back the wrong way then flip back to the correct way) Just FYI - this turret is basically a copy/paste of one of VALVe's already existing turrets. It has several think functions that run depending on its state (if it sees an enemy and is popping out, if it loses and enemy and is retiring, if it just saw an enemy but lost it, if its actively tracking an enemy, etc). Below are just some snippets; I could probably paste more if needed. This entity is networked so that's why some of the functions say (shared) as the code is accessible on both client server. //-- --- // Purpose: //-- --- bool CFFMiniTurret::UpdateFacing( void ) { bool bMoved = false; // Get current orientation of the muzzle attachment Vector vecOrigin; QAngle vecAngles; MuzzlePosition( vecOrigin, vecAngles ); // Update pitch float flDiff = -m_vecGoalAngles.x; SetPoseParameter( m_iPitchPoseParameter, flDiff ); if( miniturret_debug.GetBool() ) DevMsg( [MiniTurret] Current Pitch: %f, Goal Pitch: %f, pitch val: %f\n, vecAngles.x, m_vecGoalAngles.x, flDiff ); // Get the current yaw value float flYaw = GetPoseParameter( m_iYawPoseParameter ); if( miniturret_debug.GetBool() ) Warning( [MiniTurret] Current pose yaw: %f, vecAngles yaw: %f, goal yaw: %f\n, flYaw, vecAngles.y, m_vecGoalAngles.y ); // Update yaw flDiff = AngleNormalize( UTIL_ApproachAngle( AngleNormalize( m_vecGoalAngles.y ), AngleNormalize( flYaw ), MaxYawSpeed() ) ); SetPoseParameter( m_iYawPoseParameter, flDiff ); InvalidateBoneCache(); return bMoved; } //-- --- // Purpose: Get the muzzle position (shared) //-- --- Vector CFFMiniTurret::MuzzlePosition( void ) { Vector vecOrigin; QAngle vecAngles; SetupAttachments(); GetAttachment( m_iMuzzleAttachment, vecOrigin, vecAngles ); return vecOrigin; } //-- --- // Purpose: Get the muzzle position (shared) //-- --- void CFFMiniTurret::MuzzlePosition( Vector vecOrigin, QAngle vecAngles ) { SetupAttachments(); GetAttachment( m_iMuzzleAttachment, vecOrigin, vecAngles ); } //-- --- // Purpose: Setup attachments (shared) //-- --- void CFFMiniTurret::SetupAttachments( void ) { if( m_iMuzzleAttachment == -1 ) m_iMuzzleAttachment = LookupAttachment( FF_MINITURRET_MUZZLE_ATTACHMENT ); if( m_iEyeAttachment == -1 ) m_iEyeAttachment = LookupAttachment( FF_MINITURRET_EYE_ATTACHMENT ); if( m_iLaserAttachment == -1 ) m_iLaserAttachment = LookupAttachment( FF_MINITURRET_EYE_ATTACHMENT ); } The actual class definition: //== === // // class CFFMiniTurret // //== === #define FF_MINITURRET_MODEL models/buildable/respawn_turret/respawn_turret.mdl //#define FF_MINITURRET_GLOW_SPRITE sprites/glow1.vmt #define FF_MINITURRET_BC_YAWaim_yaw #define FF_MINITURRET_BC_PITCH aim_pitch #define FF_MINITURRET_PING_TIME 5.0 #define FF_MINITURRET_MAX_WAIT 5.0 #define FF_MINITURRET_RANGE 1024 #define FF_MINITURRET_MAX_PITCH 0.0f #define FF_MINITURRET_MIN_PITCH -90.0f #define FF_MINITURRET_MUZZLE_ATTACHMENT barrel01 #define FF_MINITURRET_EYE_ATTACHMENTeyes //== === // // class CFFMiniTurret // //== === class CFFMiniTurret : public CBaseAnimating { public: DECLARE_CLASS( CFFMiniTurret, CBaseAnimating ); DECLARE_NETWORKCLASS(); // -- Shared code CFFMiniTurret( void ); ~CFFMiniTurret(
[hlcoders] Vector math is simply beyond me.
Re-reading the email I can see some things I put in the code that were never used... and also, setting up the model its .qc is probably the more important aspect of getting the thing working as expected (but I had no part in doing that - someone else on the team did the modelling). -- Setting the pose parameters correctly (so the turret looks like it's aiming at what you want it to aim at) can be a bit tricky. I'd recommend trying to set your turret up like VALVe's carriable floor turret guy as the code is available for it. Here's some code for a ceiling mounted turret we have that can spin 360 degrees. (Note: depending on if you've modified one of the lerp functions you might see a bug when the turret reaches the 360/0 degree mark when rotating from a certain direction - it'll sort of flip back the wrong way then flip back to the correct way) Just FYI - this turret is basically a copy/paste of one of VALVe's already existing turrets. It has several think functions that run depending on its state (if it sees an enemy and is popping out, if it loses and enemy and is retiring, if it just saw an enemy but lost it, if its actively tracking an enemy, etc). Below are just some snippets; I could probably paste more if needed. This entity is networked so that's why some of the functions say (shared) as the code is accessible on both client server. //-- --- // Purpose: //-- --- bool CFFMiniTurret::UpdateFacing( void ) { bool bMoved = false; // Get current orientation of the muzzle attachment Vector vecOrigin; QAngle vecAngles; MuzzlePosition( vecOrigin, vecAngles ); // Update pitch float flDiff = -m_vecGoalAngles.x; SetPoseParameter( m_iPitchPoseParameter, flDiff ); if( miniturret_debug.GetBool() ) DevMsg( [MiniTurret] Current Pitch: %f, Goal Pitch: %f, pitch val: %f\n, vecAngles.x, m_vecGoalAngles.x, flDiff ); // Get the current yaw value float flYaw = GetPoseParameter( m_iYawPoseParameter ); if( miniturret_debug.GetBool() ) Warning( [MiniTurret] Current pose yaw: %f, vecAngles yaw: %f, goal yaw: %f\n, flYaw, vecAngles.y, m_vecGoalAngles.y ); // Update yaw flDiff = AngleNormalize( UTIL_ApproachAngle( AngleNormalize( m_vecGoalAngles.y ), AngleNormalize( flYaw ), MaxYawSpeed() ) ); SetPoseParameter( m_iYawPoseParameter, flDiff ); InvalidateBoneCache(); return bMoved; } //-- --- // Purpose: Get the muzzle position (shared) //-- --- Vector CFFMiniTurret::MuzzlePosition( void ) { Vector vecOrigin; QAngle vecAngles; SetupAttachments(); GetAttachment( m_iMuzzleAttachment, vecOrigin, vecAngles ); return vecOrigin; } //-- --- // Purpose: Get the muzzle position (shared) //-- --- void CFFMiniTurret::MuzzlePosition( Vector vecOrigin, QAngle vecAngles ) { SetupAttachments(); GetAttachment( m_iMuzzleAttachment, vecOrigin, vecAngles ); } //-- --- // Purpose: Setup attachments (shared) //-- --- void CFFMiniTurret::SetupAttachments( void ) { if( m_iMuzzleAttachment == -1 ) m_iMuzzleAttachment = LookupAttachment( FF_MINITURRET_MUZZLE_ATTACHMENT ); if( m_iEyeAttachment == -1 ) m_iEyeAttachment = LookupAttachment( FF_MINITURRET_EYE_ATTACHMENT ); if( m_iLaserAttachment == -1 ) m_iLaserAttachment = LookupAttachment( FF_MINITURRET_EYE_ATTACHMENT ); } The actual class definition: //== === // // class CFFMiniTurret // //== === #define FF_MINITURRET_MODEL models/buildable/respawn_turret/respawn_turret.mdl //#define FF_MINITURRET_GLOW_SPRITE sprites/glow1.vmt #define FF_MINITURRET_BC_YAWaim_yaw #define FF_MINITURRET_BC_PITCH aim_pitch #define FF_MINITURRET_PING_TIME 5.0 #define FF_MINITURRET_MAX_WAIT 5.0 #define FF_MINITURRET_RANGE 1024 #define FF_MINITURRET_MAX_PITCH 0.0f #define FF_MINITURRET_MIN_PITCH -90.0f #define FF_MINITURRET_MUZZLE_ATTACHMENT barrel01 #define FF_MINITURRET_EYE_ATTACHMENTeyes //== === // // class CFFMiniTurret //
Re: [hlcoders] Vector math is possible!
How to teach Vector math is an issue that we're dealing at NHTI in our game development program. NHTI is a community college, so the majority of our students are a) just out of high school and b) been out of school for quite a while. So far I've found one excellent resource on vector math. http://chortle.ccsu.edu/VectorLessons/vectorIndex.html -Grash --- Adam Maras (memzero) [EMAIL PROTECTED] wrote: Hello, everybody. I'm having a headache with a model entity I'm writing, and I need your help. To start off, the entity is a turret. It has a model, the model has pitch and yaw pose parameters I use to point the model at the player it's shooting at. That being said, I can't get the math right for the yaw to come out right at all. Here's what I have: * Vector vecAbsOrigin( GetAbsOrigin() ); // the absolute center of the model * QAngle angAbsAngles( GetAbsAngles() ); // the absolute angles of the model * Vector vecPosition; // the absolute position of what's being shot at I've tried everything I know, but I cannot put these three values together in any way that will give me a pitch and yaw for my SetPoseParameter calls that will result in this turret pointing at its target. I'm not versed in vector math, which doesn't help either. Can someone help me out? // Adam Maras (memzero) ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Souce Control
I only know how source control is setup in a professional and commercial setting. Most educational projects follow this model. I'm curious to know how mod teams (the true traditional ones with members spread out all over the place) set up their source control. Are there places that mod teams generally use? Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Vector math is simply beyond me.
-- [ Picked text/plain from multipart/alternative ] Try this pseudo code, I think it should work: Vector vecDifference = vecPosition - vecAbsOrigin; QAngle angToTarget; VectorAngles( vecDifference, angToTarget ); flYaw = angToTarget[YAW]; flPitch = angToTarget[PITCH]; SetPoseParameter ( yaw , flYaw ); SetPoseParameter ( pitch , flPitch ); - Original Message - From: Adam Maras (memzero) [EMAIL PROTECTED] To: hlcoders hlcoders@list.valvesoftware.com Sent: Monday, January 21, 2008 7:27 PM Subject: [hlcoders] Vector math is simply beyond me. Hello, everybody. I'm having a headache with a model entity I'm writing, and I need your help. To start off, the entity is a turret. It has a model, the model has pitch and yaw pose parameters I use to point the model at the player it's shooting at. That being said, I can't get the math right for the yaw to come out right at all. Here's what I have: * Vector vecAbsOrigin( GetAbsOrigin() ); // the absolute center of the model * QAngle angAbsAngles( GetAbsAngles() ); // the absolute angles of the model * Vector vecPosition; // the absolute position of what's being shot at I've tried everything I know, but I cannot put these three values together in any way that will give me a pitch and yaw for my SetPoseParameter calls that will result in this turret pointing at its target. I'm not versed in vector math, which doesn't help either. Can someone help me out? // Adam Maras (memzero) ___ 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
[hlcoders] Souce Control
1) SVN (because it's free) 2) Hosted on a buddy of someone on the team who can host stuff for free That's typically how it works for a mod team. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grash Sent: Monday, January 21, 2008 21:21 To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Souce Control I only know how source control is setup in a professional and commercial setting. Most educational projects follow this model. I'm curious to know how mod teams (the true traditional ones with members spread out all over the place) set up their source control. Are there places that mod teams generally use? Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ 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] Souce Control
We're on SVN as well. Also, we use rsync to get content out to testers. // Adam Maras (memzero) Mulchman wrote: 1) SVN (because it's free) 2) Hosted on a buddy of someone on the team who can host stuff for free That's typically how it works for a mod team. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grash Sent: Monday, January 21, 2008 21:21 To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Souce Control I only know how source control is setup in a professional and commercial setting. Most educational projects follow this model. I'm curious to know how mod teams (the true traditional ones with members spread out all over the place) set up their source control. Are there places that mod teams generally use? Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ 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] Souce Control
-- [ Picked text/plain from multipart/alternative ] We use a SVN as well, with our project lead hosting the SVN on a secure box. The bandwidth isn't always amazing, but it gets the job done well. On Jan 22, 2008 12:47 AM, Adam Maras (memzero) [EMAIL PROTECTED] wrote: We're on SVN as well. Also, we use rsync to get content out to testers. // Adam Maras (memzero) Mulchman wrote: 1) SVN (because it's free) 2) Hosted on a buddy of someone on the team who can host stuff for free That's typically how it works for a mod team. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grash Sent: Monday, January 21, 2008 21:21 To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Souce Control I only know how source control is setup in a professional and commercial setting. Most educational projects follow this model. I'm curious to know how mod teams (the true traditional ones with members spread out all over the place) set up their source control. Are there places that mod teams generally use? Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ 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 -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Souce Control
Okay, SVN across the board... That's good. As for the box, Are we talking like something on a cable modem in a few cases? Is there a particular SVN client that's better than others? -Grash --- Greg Scott [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] We use a SVN as well, with our project lead hosting the SVN on a secure box. The bandwidth isn't always amazing, but it gets the job done well. On Jan 22, 2008 12:47 AM, Adam Maras (memzero) [EMAIL PROTECTED] wrote: We're on SVN as well. Also, we use rsync to get content out to testers. // Adam Maras (memzero) Mulchman wrote: 1) SVN (because it's free) 2) Hosted on a buddy of someone on the team who can host stuff for free That's typically how it works for a mod team. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grash Sent: Monday, January 21, 2008 21:21 To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Souce Control I only know how source control is setup in a professional and commercial setting. Most educational projects follow this model. I'm curious to know how mod teams (the true traditional ones with members spread out all over the place) set up their source control. Are there places that mod teams generally use? Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ 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 -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Vector math is simply beyond me.
Woo-hoo for Util functions! --- Andrew Ritchie [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] UTIL_VecToYaw( playerPos - turretPos ) and UTIL_VecToPitch will give you the yaw and pitch which you can then use as the ideal angles then just set your pose params to the difference between your angle and those, clamp if necessary. The UTIL functions use some trig which you should take a look at since it does come in handy for atleast understanding how to go about solving some of these types of issues. -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Souce Control
The norm is to rent a server and set up svn on it. I got a local server (to my house) with svn for local projects. Runs very well. Lodle PDark Source -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grash Sent: Tuesday, January 22, 2008 2:21 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Souce Control I only know how source control is setup in a professional and commercial setting. Most educational projects follow this model. I'm curious to know how mod teams (the true traditional ones with members spread out all over the place) set up their source control. Are there places that mod teams generally use? Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ 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