[hlcoders] Fw: Non interactive props.
Hey all. Again probably a lame question but im gonna pop it in here anyway. I am spawning some prop_physics_multiplayer into an explosion, so I cannot use TempEnts-PhysicsProp as it gets destroyed in the blast it is spawned in. My problem is making them interacable to other explosions etc or being shot or anything other than being pushed by player movement. If I change COLLISION_GROUP_PUSHAWAY to COLLISION_GROUP_NONE then they push players away instead of vice-versa. Any help would be gratefully appreciated. [CODE] CPhysicsProp *pBase = (CPhysicsProp *)CreateEntity( prop_physics_multiplayer, -1 ); if ( !pBase ) { HUD_printAll( No pBase for prop_physics ! ); return; } } pBase-SetModel( ModelName ); Vector vTeleport; Vector VecDir; VecDir.x = m_Random-RandomFloat( -500, 500 ); VecDir.y = m_Random-RandomFloat( -500, 500 ); VecDir.z = m_Random-RandomFloat( -10, 500 ); vOrigin= (Explosion Origin); vOrigin.z += m_Random-RandomInt( 30, 70 ); vOrigin.x += m_Random-RandomInt( -10, 10 ); vOrigin.y += m_Random-RandomInt( -10, 10 ); ang = QAngle( m_Random-RandomInt( -10, 10 ), m_Random-RandomInt( -10, 10 ), m_Random-RandomInt( -10, 10 ) ); pBase-SetCollisionGroup( COLLISION_GROUP_PUSHAWAY ); pBase-SetMoveType( MOVETYPE_VPHYSICS, MOVECOLLIDE_DEFAULT ); pBase-SetMaxHealth( 20 ); pBase-SetHealth( 20 ); if ( pBase-CreateVPhysics() ) { pBase-SetCollisionBounds( -Vector(15,15,15), Vector(15,15,15) ); pBase-SetMoveType( MOVETYPE_VPHYSICS, MOVECOLLIDE_DEFAULT ); pBase-SetCollisionGroup( COLLISION_GROUP_PUSHAWAY ); pBase-SetMaxHealth( 20 ); pBase-SetHealth( 20 ); IPhysicsObject *IPhys = pBase-VPhysicsGetObject(); if ( IPhys ) { IPhys-SetMass( 10 ); IPhys-EnableCollisions( true ); IPhys-EnableGravity( true ); IPhys-EnableMotion( true ); IPhys-Wake(); } pBase-Teleport( vOrigin, ang, VecDir); } [/CODE] ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Is there such a thing as a NULL model?
Hi, I'm faced with a problem right now, and i've been trying a few solutions but to no avail so far... I'm trying to create a weapon that has a first person view model, but no third person model at all (the character model will display the animation). I've tried SetModel(NULL); or putting as the world model name in the script file, both those crash me... I've tried putting a bunch of AddEffect(EF_NODRAW) everywhere in my weapon class, no luck there, i've had a modeller make me an empty model, and that also crashes... Anyone got a simple solution for me to fix this problem? -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 25/11/2005 ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Is there such a thing as a NULL model?
For early versions of hidden we just commented out the world model from the weapon script - it threw an error in the console, but didn't crash and the model was invisible (no error model either). Might be a good place to start looking. If that doesn't work for you, could you not maybe set the models alpha to 0? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Imperio59 Sent: 26 November 2005 20:20 To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Is there such a thing as a NULL model? Hi, I'm faced with a problem right now, and i've been trying a few solutions but to no avail so far... I'm trying to create a weapon that has a first person view model, but no third person model at all (the character model will display the animation). I've tried SetModel(NULL); or putting as the world model name in the script file, both those crash me... I've tried putting a bunch of AddEffect(EF_NODRAW) everywhere in my weapon class, no luck there, i've had a modeller make me an empty model, and that also crashes... Anyone got a simple solution for me to fix this problem? -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 25/11/2005 ___ 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] Is there such a thing as a NULL model?
I did this for the Fatman Fist weapon in dystopia. I modified the SetWeaponVisible() for the fist, so it would AddEffects( EF_NODRAW ); (which hides the world model) and then vm-RemoveEffects( EF_NODRAW ); so it shows the viewmodel On 11/27/05, Chris Janes [EMAIL PROTECTED] wrote: For early versions of hidden we just commented out the world model from the weapon script - it threw an error in the console, but didn't crash and the model was invisible (no error model either). Might be a good place to start looking. If that doesn't work for you, could you not maybe set the models alpha to 0? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Imperio59 Sent: 26 November 2005 20:20 To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Is there such a thing as a NULL model? Hi, I'm faced with a problem right now, and i've been trying a few solutions but to no avail so far... I'm trying to create a weapon that has a first person view model, but no third person model at all (the character model will display the animation). I've tried SetModel(NULL); or putting as the world model name in the script file, both those crash me... I've tried putting a bunch of AddEffect(EF_NODRAW) everywhere in my weapon class, no luck there, i've had a modeller make me an empty model, and that also crashes... Anyone got a simple solution for me to fix this problem? -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.8/183 - Release Date: 25/11/2005 ___ 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