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 , 04:09   Re: Bouncing Props?
Reply With Quote #11

Thanks, but I know C++ well enough to recognize C++ code. I don't want to build extensions cause I have no experience with HL2 engine and extension building, let alone spend days learning something I will never use(lets hope so). I'm looking for a simple way to do it in SourcePawn.

Thanks.
shine771 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-27-2010 , 05:05   Re: Bouncing Props?
Reply With Quote #12

Quote:
Originally Posted by shine771 View Post
Thanks, but I know C++ well enough to recognize C++ code. I don't want to build extensions cause I have no experience with HL2 engine and extension building, let alone spend days learning something I will never use(lets hope so). I'm looking for a simple way to do it in SourcePawn.

Thanks.
I've added these two functions to my VPhysics extension for you.
Just look in the include for the params.
__________________
asherkin is offline
shine771
Senior Member
Join Date: Jun 2007
Old 12-27-2010 , 05:25   Re: Bouncing Props?
Reply With Quote #13

Thank you, but there seems to be a problem. I'm getting:
Quote:
unable to load plugin. Native 'Phys_GetMaterialIndex'(and 'Phys_SetMaterialIndex' too) not found
. Maybe you forgot to add something in your extension.

P.s. Other functions work.

Last edited by shine771; 12-27-2010 at 05:27.
shine771 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-27-2010 , 05:40   Re: Bouncing Props?
Reply With Quote #14

Quote:
Originally Posted by shine771 View Post
Thank you, but there seems to be a problem. I'm getting: . Maybe you forgot to add something in your extension.

P.s. Other functions work.
Sorry about that, fixed.
__________________
asherkin is offline
shine771
Senior Member
Join Date: Jun 2007
Old 12-27-2010 , 05:57   Re: Bouncing Props?
Reply With Quote #15

Redownloaded, restarted server, but still the same error only when using those 2 functions.
shine771 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-27-2010 , 06:16   Re: Bouncing Props?
Reply With Quote #16

Delete the files and try the download again, as I'm 99% sure everything is fine at this point.
Make sure you stop the server first.
__________________
asherkin is offline
shine771
Senior Member
Join Date: Jun 2007
Old 12-27-2010 , 06:38   Re: Bouncing Props?
Reply With Quote #17

Thank you! Everything is working almost perfect. The only thing that bothers me is that my prop is too slippery. It's like sliding soup on a glass table. 'm_flFriction' parameter doesn't seem to work. I could try to do it manually if I could hook a Touch which would register when my prop touches world. Any ideas how to make it less slippery?

Thanks.

Last edited by shine771; 12-27-2010 at 06:42.
shine771 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-27-2010 , 10:32   Re: Bouncing Props?
Reply With Quote #18

SDK Hooks extension, hook OnTouch, world = 0 and fires each time it bounces.
__________________
Silvers is offline
shine771
Senior Member
Join Date: Jun 2007
Old 12-27-2010 , 17:38   Re: Bouncing Props?
Reply With Quote #19

If you read my first post, I already told you - it doesn't detect world touches. I'm trying now with TR_TraceHull, but it seems to be too slow. I'm using it in OnGameFrame(), but it doesn't detect all touches even if I extend Mins and Maxs by 5 units. I'm new to HL2 engine. Maybe there is a special flag which I haven't noticed that allows SDKHooks to detect world touches. I would appreciate if you could give me a code example on how to detect world touches.

Thanks.
shine771 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-27-2010 , 17:54   Re: Bouncing Props?
Reply With Quote #20

This seemed to work for me at least, maybe it doesn't trigger on every surface, I haven't played with it much.

PHP Code:
// Hook your entity
SDKHook(iEntitySDKHook_TouchSDKHook_Touch_Callback);


public 
SDKHook_Touch_Callback(entityent)
{
    
PrintToChatAll("Entity touched %i"ent);
    
// entity = the entity ID of the prop you hooked
    // ent = the entity ID your prop touches

__________________
Silvers 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:57.


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