Raised This Month: $51 Target: $400
 12% 

Bouncing Props?


Post New Thread Reply   
 
Thread Tools Display Modes
shine771
Senior Member
Join Date: Jun 2007
Old 12-27-2010 , 18:49   Re: Bouncing Props?
Reply With Quote #21

I have the same code. As I told you - it doesn't detect world. Maybe you can post a code snippet and show how you create props?
shine771 is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-28-2010 , 03:00   Re: Bouncing Props?
Reply With Quote #22

Game ? Model has a phybox ?
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<

Last edited by andi67; 12-28-2010 at 03:03.
andi67 is offline
shine771
Senior Member
Join Date: Jun 2007
Old 12-28-2010 , 04:52   Re: Bouncing Props?
Reply With Quote #23

Counter-Strike: Source. Phybox? I assume that stands for Physics box? When I compiled my model, I set a collision model if that's what you mean. And as I said, when I set it's movetype to MOVETYPE_FLYGRAVITY it had a visible solid model and a invisible physical model. Either way, I think I have a 'phybox'.

Last edited by shine771; 12-28-2010 at 04:59.
shine771 is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 12-28-2010 , 10:17   Re: Bouncing Props?
Reply With Quote #24

Yeah....itīs similar to my prob I had a few weeks ago....I have fired a prop_physics when someone was attacking with a knife.....it has bounced off everything but not the playermodels , so I used a traceray for detecting if a playermodel was hit.
Your codesnippet would be helpfull.......
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
shine771
Senior Member
Join Date: Jun 2007
Old 12-28-2010 , 19:08   Re: Bouncing Props?
Reply With Quote #25

I've got an idea how I can do this without touch. I just need to know how to make props Spin in a certain direction? I tried with 'm_angRotation', but that seemed to have no effect.
shine771 is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 12-28-2010 , 19:45   Re: Bouncing Props?
Reply With Quote #26

"m_vecAngVelocity"
blodia is offline
shine771
Senior Member
Join Date: Jun 2007
Old 12-28-2010 , 23:49   Re: Bouncing Props?
Reply With Quote #27

Doesn't seem to work. Returns {0.0, 0.0, 0.0}.
Also it seems like m_vecVelocity isn't working correctly too. When I use TeleportEntity to change it's velocity, it updates m_vecVelocity variable, but after that it doesn't change. Also when I modify it nothing happens. I assume those variables are only for getting information about the entity? I haven't tested, but I presume that you can't change origin with 'SetEntPropVector' either. If I remember correctly, in HL1 engine velocity was constantly updated.
Is there any way to get access to a constantly updated velocity variable and how can I change prop's spinning velocity/direction?
By the way, I figured out a way to detect touch for props:

PHP Code:
public fCreateEntity() {
    
    new 
iEnt CreateEntityByName("prop_physics_multiplayer");
    
    if(!
IsValidEntity(iEnt))
        return;
    
    
DispatchKeyValue(iEnt,"model",szModel);
    
DispatchKeyValue(iEnt,"Solid","6");
    
    
DispatchKeyValue(iEnt,"physdamagescale","10000.0");
    
DispatchKeyValue(iEnt,"minhealthdmg","0");
    
    
DispatchSpawn(iEnt);
    
    
SetEntityMoveType(iEnt,MOVETYPE_VPHYSICS);
    
SetEntProp(iEnt,Prop_Data,"m_CollisionGroup",5); 
    
SetEntProp(iEnt,Prop_Data,"m_usSolidFlags",28);
    
    
SDKHook(iEnt,SDKHook_OnTakeDamage,fOnTakeDamage);
}

public 
Action:fOnTakeDamage(iEnt,&iAttacker,&iInflictor,&Float:flDamage,&iDamageType) {

    if(
iDamageType != DMG_CRUSH)
        return;
    
    static 
String:szAttacker[3];
    
IntToString(iAttacker,szAttacker,sizeof(szAttacker));
    
    
PrintToChatAll("Prop touched %s",!iAttacker "world" szAttacker);

It seemed to work flawlessly with default MaterialIndex, but with MaterialIndex 4(bouncy) it registered ~90% touches.
shine771 is offline
Reply



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

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

Forum Jump


All times are GMT -4. The time now is 07:31.


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