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

Rocket Bounce Sphere Surface


Post New Thread Reply   
 
Thread Tools Display Modes
MikeJS
Senior Member
Join Date: Nov 2008
Old 01-17-2014 , 03:00   Re: Rocket Bounce Sphere Surface
Reply With Quote #11

Quote:
Originally Posted by Skippy View Post
These are the errors I'm getting

HTML Code:
error 022: must be lvalue (non-constant)
PHP Code:
    b /= mag
Go to near the top of IntersectSegmentSphere:

Code:
new const Float:b = GetVectorDotProduct( m, d );

lose the const

Quote:
Originally Posted by Skippy View Post
HTML Code:
error 035: argument type mismatch (argument 2)
PHP Code:
GetArrayArrayspherescentrei); 
Code:
GetArrayArray( spheres, i, centre, 3 );

There is another similar error further down

Quote:
Originally Posted by Skippy View Post
HTML Code:
error 017: undefined symbol "i"
PHP Code:
new Float:radius GetArrayCellspheresi); 
Code:
new Float:radius = GetArrayCell( spheres, closestSphere, 4 );

This also occurs twice

Quote:
Originally Posted by Skippy View Post
HTML Code:
error 017: undefined symbol "t"
PHP Code:
LerpVectorslastPospostintersection ); 
HTML Code:
error 017: undefined symbol "t"
PHP Code:
ScaleVectorpenetration1.0 ); 
replace `t` with `closestT`.

I also changed IntersectSegmentSphere again (the last line)
__________________

Last edited by MikeJS; 01-17-2014 at 03:03.
MikeJS is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 01-17-2014 , 20:04   Re: Rocket Bounce Sphere Surface
Reply With Quote #12

Yeah I inserted the code and the rocket didn't do anything when I shot it toward the sphere area.
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 01-18-2014 , 04:56   Re: Rocket Bounce Sphere Surface
Reply With Quote #13

You want to hook SetTransmit on the rocket. something like: (not sure if tf_projectile_rocket is correct, or if you need to unhook when it dies)

Code:
public OnEntitySpawned( entity, const String:classname[] ) {         if( IsValidEntity( entity ) && StrEqual( classname, "tf_projectile_rocket" ) ) {                 SDKHook( entity, SDKHook_SetTransmit, OnThink );         }        }
__________________

Last edited by MikeJS; 01-18-2014 at 04:56.
MikeJS is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 01-18-2014 , 11:03   Re: Rocket Bounce Sphere Surface
Reply With Quote #14

Quote:
Originally Posted by MikeJS View Post
You want to hook SetTransmit on the rocket. something like: (not sure if tf_projectile_rocket is correct, or if you need to unhook when it dies)

Code:
public OnEntitySpawned( entity, const String:classname[] ) {         if( IsValidEntity( entity ) && StrEqual( classname, "tf_projectile_rocket" ) ) {                 SDKHook( entity, SDKHook_SetTransmit, OnThink );         }        }
I know I did have it like that
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 01-18-2014 , 13:49   Re: Rocket Bounce Sphere Surface
Reply With Quote #15

Did you fill in the bits I left out (dealing with spheres/lastPosArray) :p
__________________
MikeJS is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 01-18-2014 , 13:52   Re: Rocket Bounce Sphere Surface
Reply With Quote #16

Quote:
Originally Posted by MikeJS View Post
Did you fill in the bits I left out (dealing with spheres/lastPosArray) :p
I tried that's why I added you to see where I put my sphereradius and coord
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 01-20-2014 , 07:47   Re: Rocket Bounce Sphere Surface
Reply With Quote #17

Quote:
Originally Posted by Skippy View Post
I tried that's why I added you to see where I put my sphereradius and coord
Sorry, busy weekend...

The spheres array should contain tuples of the form (x, y, z, r).

eg
Code:
addSphere( const Float:pos[ 3 ], const Float:radius ) {     const Float:sphere[] = { pos[ 0 ], pos[ 1 ], pos[ 2 ], radius };     PushArrayArray( spheres, sphere ); }
__________________
MikeJS is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 01-20-2014 , 08:54   Re: Rocket Bounce Sphere Surface
Reply With Quote #18

Use a model, and hooktouch it.
Why make things harder than they need to be.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 01-20-2014 , 11:31   Re: Rocket Bounce Sphere Surface
Reply With Quote #19

Quote:
Originally Posted by friagram View Post
Use a model, and hooktouch it.
Why make things harder than they need to be.
Does model use bounding box rather than sphear?
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 01-20-2014 , 15:03   Re: Rocket Bounce Sphere Surface
Reply With Quote #20

Quote:
Originally Posted by friagram View Post
Use a model, and hooktouch it.
Why make things harder than they need to be.
And if you want to do accurate reflections with that you will need to perform backwards tracing and everything else my code does anyway.
__________________
MikeJS 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:14.


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