Re: [hlcoders] Re: 3 round burst
I think Tony has a good point there. Plus its easy to code... On 5/10/05, bob [EMAIL PROTECTED] wrote: Thanks Again --- --- Robert I Chatman III --- www.swallowbush.com --- [EMAIL PROTECTED] --- (408) 569-4436 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, May 09, 2005 6:25 AM To: hlcoders@list.valvesoftware.com Subject: hlcoders digest, Vol 1 #1908 - 9 msgs Send hlcoders mailing list submissions to hlcoders@list.valvesoftware.com To subscribe or unsubscribe via the World Wide Web, visit http://list.valvesoftware.com/mailman/listinfo/hlcoders or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] The three round burst is not nearly as complex as you are making it. Look here : http://www.swallowbush.com/forum/viewtopic.php?t=326 By doing the code like this you don't have to worry about any of that shooting 3 at once drama. It always shoots 1. I actually have refined my code a bit more so if you want to, I can update my forum so it has the flagged version. I added a flag for automatic, as well as ready, to fix some bugs in my original code. ___ 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] Re: 3 round burst
I gave a better thought about what Tony said. The solution does not work... Burst mode always fire 3 shot. Not more, not less. On his code, you would be able to fire one or two shots while using burst mode On 5/10/05, Andre Bandarra [EMAIL PROTECTED] wrote: I think Tony has a good point there. Plus its easy to code... On 5/10/05, bob [EMAIL PROTECTED] wrote: Thanks Again --- --- Robert I Chatman III --- www.swallowbush.com --- [EMAIL PROTECTED] --- (408) 569-4436 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, May 09, 2005 6:25 AM To: hlcoders@list.valvesoftware.com Subject: hlcoders digest, Vol 1 #1908 - 9 msgs Send hlcoders mailing list submissions to hlcoders@list.valvesoftware.com To subscribe or unsubscribe via the World Wide Web, visit http://list.valvesoftware.com/mailman/listinfo/hlcoders or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] The three round burst is not nearly as complex as you are making it. Look here : http://www.swallowbush.com/forum/viewtopic.php?t=326 By doing the code like this you don't have to worry about any of that shooting 3 at once drama. It always shoots 1. I actually have refined my code a bit more so if you want to, I can update my forum so it has the flagged version. I added a flag for automatic, as well as ready, to fix some bugs in my original code. ___ 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] New Mod Directory on Visual C++ 2003 .NET
Hello everyone! Sorry if i am asking a stupid question, but i am a newbie at VC++ 2003 .NET. Let me explain what i want. So.. there are basically 3 MOD options inside the SDK. HL2, HL2DM and SDK. As i wanted to keep my MOD organized, i wanted to created a new one, called MYMOD and copy the files under SDK into it, them compile using the code in MYMOD. But then i dont know how to make the compiler compile the files inside MYMOD. Can anybody help me? I know it is possible because there are SDK, HL2 and HL2DM. I Thanks ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] New Mod Directory on Visual C++ 2003 .NET
No luck on these ones. Every modification is made on the existing files on the existing directories. O want to create a new directory. On Fri, 25 Feb 2005 13:23:52 -0500, Rice, Rick [EMAIL PROTECTED] wrote: Try the following references: http://www.hl2coding.com/wiki/ http://www.hl2world.com/wiki/index.php/Main_Page http://www.sourcewiki.org/wiki/index.php/Main_Page and of course: http://collective.valve-erc.com/ Everything you need is there. good luck. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andre Bandarra Sent: Friday, February 25, 2005 1:01 PM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] New Mod Directory on Visual C++ 2003 .NET Hello everyone! Sorry if i am asking a stupid question, but i am a newbie at VC++ 2003 .NET. Let me explain what i want. So.. there are basically 3 MOD options inside the SDK. HL2, HL2DM and SDK. As i wanted to keep my MOD organized, i wanted to created a new one, called MYMOD and copy the files under SDK into it, them compile using the code in MYMOD. But then i dont know how to make the compiler compile the files inside MYMOD. Can anybody help me? I know it is possible because there are SDK, HL2 and HL2DM. I 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 ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] HL2DM Mod Bot
Hello I´m making a mod using HL2DM. I wanted to setup a simple bot to use for testing the MOD. Does anybody have any idea of the best way of doing it? Should i try to copy the Bot interface on the SDK or user the serverplugin_bot?? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Respawning all players
I use this code because i am making a round based game which has a intermission between rounds. So, i respawn the players at the beginning of the intermission an freeze them. I unfreeze them once the round starts. André On Wed, 23 Feb 2005 20:34:49 +1000, Teddy [EMAIL PROTECTED] wrote: If you're using Andre's example code, the bit that freezes the player is: player-SetMoveType(MOVETYPE_NONE); either remove that, or once the player is spawned and you wanna unfreeze them, use: player-SetMoveType(MOVETYPE_WALK) On Tue, 22 Feb 2005 16:08:41 -0800, Daniel Jennings [EMAIL PROTECTED] wrote: Do you ever unfreeze the player? Or is that something that's automatically done? Thank you, Daniel Jennings - Original Message - From: Andre Bandarra [EMAIL PROTECTED] To: hlcoders@list.valvesoftware.com Sent: Monday, February 21, 2005 5:22 AM Subject: Re: [hlcoders] Respawning all players I use this one for ( int i = 0 ; i = gpGlobals-maxClients ; i++ ) { CBasePlayer *player = (CBasePlayer *)UTIL_PlayerByIndex(i); if ( player ) { player-RemoveAllAmmo(); //Removes all ammo player-RemoveAllDecals();//Removes All decals from the player model player-Spawn(); //Spawns the player player-SetMoveType(MOVETYPE_NONE);//freezes the player //now we have to cycle through all the players weapons for ( int j = 0 ; jplayer-WeaponCount() ; j++) { CBaseCombatWeapon *pweapon = player-GetWeapon(j); if (pweapon) pweapon-Delete();//removes this weapon from the game; } } } On Sun, 20 Feb 2005 14:42:46 -0500, Lance Vorgin [EMAIL PROTECTED] wrote: static_castCBasePlayer*(pEntity)-RemoveAllItems(false); ? ___ 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 ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Respawning all players
I use this one for ( int i = 0 ; i = gpGlobals-maxClients ; i++ ) { CBasePlayer *player = (CBasePlayer *)UTIL_PlayerByIndex(i); if ( player ) { player-RemoveAllAmmo(); //Removes all ammo player-RemoveAllDecals();//Removes All decals from the player model player-Spawn(); //Spawns the player player-SetMoveType(MOVETYPE_NONE);//freezes the player //now we have to cycle through all the players weapons for ( int j = 0 ; jplayer-WeaponCount() ; j++) { CBaseCombatWeapon *pweapon = player-GetWeapon(j); if (pweapon) pweapon-Delete();//removes this weapon from the game; } } } On Sun, 20 Feb 2005 14:42:46 -0500, Lance Vorgin [EMAIL PROTECTED] wrote: static_castCBasePlayer*(pEntity)-RemoveAllItems(false); ? ___ 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] Making timers
Or you can always use the CountDownTimer class in the util_shared.h... CountDownTimer roundTimer; roundTimer.Start(mp_roundlimit.GetFloat() * 60); if (roundTimer.isElapsed()) { } roundTimer.Reset()... and so on.. Just look the CountDownTimer class. On Mon, 21 Feb 2005 17:04:09 +, Ben Davison [EMAIL PROTECTED] wrote: I'll show you my basic timer(you have to add the hud elements yourself) This for HL2DM. multiplay_gamerules.h extern ConVar mp_roundlimit; multiplay_gamerules.cpp // Round limit ConVar mp_roundlimit( mp_roundlimit, 0, FCVAR_NOTIFY|FCVAR_REPLICATED, game time per round in minutes ); hl2mp_gamerules.cpp void CHL2MPRules::Think( void ) In this function. float flRoundTimer = mp_roundlimit.GetFloat() * 60; //Intrest: Timer. if ( flRoundTimer != 0 gpGlobals-curtime = flRoundTimer ) { Msg(Round over); return; //RestartRound(); } As you can see you will have to put it on the hud and RestartRound(); On Thu, 01 Jan 2004 00:13:54 +, Knifa [EMAIL PROTECTED] wrote: Okay, thanks alot :) http://www.sourcewiki.org/wiki/index.php/Creating_a_Roundtimer that shows you how to make a round timer and display it on the HUD. basically all you do is put a timer in either your game rules(for a global timer) or your player(for a timer for each player) by checking a start time against gpGlobals-curtime and getting a hud element to display it, or in your case call something to trigger a build event and restart. the tute decribes it better :( -- ** Draco Coder for Perfect Dark and Kreedz Climbing http://perfectdark.game-mod.net ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- Knifa Domino Mod http://knd.org.uk/dominomod/ ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- - Ben Davison - http://www.shadow-phoenix.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] Removing Dead Corpses
It works with server ragdolls, but i think that the dead bodies are client-only ragdolls. I don know how to search trough the client entities. On Thu, 17 Feb 2005 15:39:15 +1000, Draco [EMAIL PROTECTED] wrote: Find out the entity name for ragdolls, search through all entities(forget func for that, its in util.cpp if memory serves) with that class name and call a function to destroy it(base ent should have one) -- ** Draco Coder for Perfect Dark and Kreedz Climbing http://perfectdark.game-mod.net ___ 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] Removing Dead Corpses
This code worked perfectly!!! CBaseEntity * ragdoll = (CBaseEntity * ) gEntList.FindEntityByClassname(NULL,sdk_ragdoll); while (ragdoll) { DevMsg(Removing client Ragdoll); ragdoll-Remove(); ragdoll = (CBaseEntity * ) gEntList.FindEntityByClassname(ragdoll,sdk_ragdoll); } On Thu, 17 Feb 2005 12:26:22 -0300, Andre Bandarra [EMAIL PROTECTED] wrote: It works with server ragdolls, but i think that the dead bodies are client-only ragdolls. I don know how to search trough the client entities. On Thu, 17 Feb 2005 15:39:15 +1000, Draco [EMAIL PROTECTED] wrote: Find out the entity name for ragdolls, search through all entities(forget func for that, its in util.cpp if memory serves) with that class name and call a function to destroy it(base ent should have one) -- ** Draco Coder for Perfect Dark and Kreedz Climbing http://perfectdark.game-mod.net ___ 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] Removing Dead Corpses
OK... On a round based game, how do i do to remove dead bodies when the round ends? Are the ragdolls client-only or they are on the server too? I respawned all the possible entities but the dead bodies still there... ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Weapon ballastics
Ok... i imagine something like... You have a CBulletManager class. someone shoots a bullet. You test if this bullet hits something in this timeframe (1000ft depending on the weapon) and it is an instant hit. if it does not hit anything, you pass the bullet to the bulletmanager, so the bulletmanager continues to trace the bullet on the next ticks, until it hist something or exceeds max distance... On Thu, 3 Feb 2005 20:27:03 -0800, Jay Stelly [EMAIL PROTECTED] wrote: The ammodef defines an impulse (mass * velocity) for the bullet to apply to physics objects when it hits them. Applying an impulse is equivalent to a collision. That macro just converts units so we could use some standard ballistics data with bullet mass in grains and speed in feet per second. Jay -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of r00t 3:16 Sent: Thursday, February 03, 2005 5:40 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Weapon ballastics In sdk_gamerules #define BULLET_IMPULSE(grains, ftpersec) ((ftpersec)*12*BULLET_MASS_GRAINS_TO_KG(grains)*BULLET_IMPULSE _EXAGGERATION) BULLET_IMPULSE does not seem to be used in the ammodef, so I changed it to def.AddAmmoType( AMMO_BULLETS, DMG_BULLET, TRACER_LINE, 0, 0, 2400/*max carry*/, BULLET_IMPULSE(200, 1225), 0); What affects does this have on the bullet if any? in the MP SDK ? r00t 3:16 CQC Gaming www.cqc-gaming.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] Check if a file or folder exists at Client
Well, i did a little googling and found two options. /* ACCESS.C: This example uses _access to check the * file named ACCESS.C to see if it exists and if * writing is allowed. */ #include io.h #include stdio.h #include stdlib.h void main( void ) { /* Check for existence */ if( (_access( ACCESS.C, 0 )) != -1 ) { printf( File ACCESS.C exists\n ); /* Check for write permission */ if( (_access( ACCESS.C, 2 )) != -1 ) printf( File ACCESS.C has write permission\n ); } } //mode Value Checks File For //00 Existence only //02 Write permission //04 Read permission //06 Read and write permission and the other one is: #include sys/types.h #include sys/stat.h #include stdio.h int FileExists(char *filename) { struct _stat buf; int status; status = _stat(filename,buf); if(status==0) return(1); else return(0); } If the file exists, it will return 1. If there is no file, you get back 0. This is a Win32 version. If you are not in Win32, it will probably be stat() without an underscore in front. Give it a try, and let me know how it works out for you! found them on this topic: http://www.experts-exchange.com/Programming/Programming_Languages/C/Q_11129365.html On Wed, 02 Feb 2005 08:40:28 -0600, Jeffrey botman Broome [EMAIL PROTECTED] wrote: Frank Weima wrote: Hi, I tried the folowing: snip Where did you put the code (in which .cpp file)? Also, opening the file to check for existence is considered bad form since you are changing the modification date of the file when you do this. Something like _stat() doesn't change any of the file properties. -- Jeffrey botman Broome ___ 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