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

Some vector maths help!


Post New Thread Reply   
 
Thread Tools Display Modes
xf117
Senior Member
Join Date: Mar 2010
Location: Russia
Old 10-14-2013 , 12:10   Re: Some vector maths help!
Reply With Quote #11

You still need to calc the direction and when delete point_push after that. It is actually much more flexible, fast and convenient to do it from sourcemod.

Another deal if you want some kind of constant pushing mechanism, only then using of point_push is justified
xf117 is offline
Send a message via ICQ to xf117
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-14-2013 , 15:26   Re: Some vector maths help!
Reply With Quote #12

Well, with point push you can just create a vector some x units away from the client along your sightline, spawn and acivate it, and kill it on the next frame. You can use the spawnflags to make it only hit line of sight entities, or kill it on a timer, and it also calculates the force based on distance by the values you set.

The only one downside is that it will hit other nerby entities, but again, easily resolved by making the push so small that it will only it the client.. Even spawning it within their bbox.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 10-19-2013 , 17:26   Re: Some vector maths help!
Reply With Quote #13

Quote:
Originally Posted by friagram View Post
Well, with point push you can just create a vector some x units away from the client along your sightline, spawn and acivate it, and kill it on the next frame. You can use the spawnflags to make it only hit line of sight entities, or kill it on a timer, and it also calculates the force based on distance by the values you set.

The only one downside is that it will hit other nerby entities, but again, easily resolved by making the push so small that it will only it the client.. Even spawning it within their bbox.

I'd love to learn how to do all that, but don't really have a clue how to! Any chance you could show me some sample code that would do this?
Remy Lebeau is offline
Bimbo1
Senior Member
Join Date: Jan 2010
Location: brazil
Old 10-20-2013 , 02:16   Re: Some vector maths help!
Reply With Quote #14

well, i can't show some sample code right now, but take a look at these:
https://developer.valvesoftware.com/wiki/Point_push
datamap dump
you will need to use CreateEntityByName, DispatchKeyValue, DispatchSpawn, TeleportEntity, SetEntProp... the way to use them all depends on what you're trying to achieve.
__________________
sie sind das essen und wir sind die jäger!
Bimbo1 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 12:24.


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