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

simulating projectile ricochet


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
farawayf
Senior Member
Join Date: Jan 2019
Old 06-28-2019 , 12:12   simulating projectile ricochet
Reply With Quote #1

im trying to do noblock projectiles for teammates.

PHP Code:
public void OnEntityCreated(int entity, const char[] classname) {
    if (
StrEqual(classname"smokegrenade_projectile"false)) {
        
SDKHook(entitySDKHook_StartTouchOnTouch);
        
SetEntData(entityCollisionGroup21true);
    }
}

public 
void OnTouch(int entityint client) {
    
int owner GetEntPropEnt(entityProp_Send"m_hThrower"); 
    if(
GetClientTeam(client) != GetClientTeam(owner)) {
        
int hurt CreateEntityByName("point_hurt");
        
AcceptEntityInput(hurt"TurnOn");
        
SetEntProp(hurtProp_Data"m_nDamage"1);
        
SetEntProp(hurtProp_Data"m_bitsDamageType"DMG_GENERIC);
        
AcceptEntityInput(hurt"Hurt"owner);
        
AcceptEntityInput(hurt"TurnOff");
    }

but projectiles pass through enemies. And now i want to simulate hit and ricochet manually.

Any ideas how to make this ?

Last edited by farawayf; 06-28-2019 at 12:17.
farawayf is offline
Shane1390
Member
Join Date: Apr 2018
Old 06-28-2019 , 12:25   Re: simulating projectile ricochet
Reply With Quote #2

I had this same problem and I'm not too sure if noblock and grenade damage can co-exist, however I did make a somewhat "hacky" solution, by creating a trigger_multiple, making it conform to the size of the projectile and fly with it.
Attached Files
File Type: sp Get Plugin or Get Source (grenades_fix.sp - 150 views - 3.0 KB)
Shane1390 is offline
FroGeX
Senior Member
Join Date: Aug 2020
Old 01-23-2021 , 06:51   Re: simulating projectile ricochet
Reply With Quote #3

Try set different CollisionGroups and SolidTipes on nade.
FroGeX 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 04:29.


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