help with reorienting a rocket (Team Fortress Classic)
Hello, okay so in TFC you have a rocket launcher that serves as the aim origin for the rocket, but this is off-center. It kind of diagonally aims the rocket into your crosshair's destination.
I wish to capture a rocket launch event, get the rocket, and re-fire it dead center of the player's aim. I want quake 3 style rockets basically. Some code snippets to jog the memory: Quote:
|
Re: help with reorienting a rocket (Team Fortress Classic)
In other words, I want to do this:
// get user's view angle pev( id, pev_v_angle, viewangles ); // get user's origin pev(id, pev_origin, usrorig); // move rocket projectile to user's origin engfunc(EngFunc_SetOrigin, rocket, usrorig); // change its view angle to players' set_pev(rocket,pev_angles,viewangles); // and apply 900 units of speed (vector_length of 900) to it Here I'm confused. |
Re: help with reorienting a rocket (Team Fortress Classic)
Quake 3 has a command "makevectors" that makes a vector with length of 1 from viewangles.
https://quakewiki.org/wiki/makevectors What is the amxmodx equivalent of this? |
Re: help with reorienting a rocket (Team Fortress Classic)
Ah, I have it.
velocity_by_aim(iIndex, iVelocity, Float:vRetValue[3]); |
Re: help with reorienting a rocket (Team Fortress Classic)
Quote:
|
Re: help with reorienting a rocket (Team Fortress Classic)
@HamletEagle yes that page was pivotal in figuring this out, thanks.
Going to make an update to the lagless rocket plugin in some days. |
| All times are GMT -4. The time now is 11:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.