AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Change Veritcal aiming? (https://forums.alliedmods.net/showthread.php?t=156954)

Owyn 05-14-2011 09:17

Change Veritcal aiming?
 
hi, after trying everything without 100% success i came here ^_^


PHP Code:

new Float:P_ANG[33][3]; 

so i
PHP Code:

 entity_get_vector(id,EV_VEC_angles,P_ANG[id]); 

then
PHP Code:

    entity_set_vector(idEV_VEC_anglesP_ANG[id]);
    
entity_set_int(idEV_INT_fixangle1); 

it changes aiming to direction which was saved, but it doesn't restore vertical position e.g. was looking at roof or floor, only at which direction user was looking. so, is it possible to save and then set vertical Aiming position also?

hlstriker 05-14-2011 14:39

Re: Change Veritcal aiming (z axis)?
 
Use EV_VEC_v_angle

ConnorMcLeod 05-14-2011 14:54

Re: Change Veritcal aiming (z axis)?
 
Store v_angle et restore to angles.
(Or store angles and restore in v_angle, don't remember).
You can see code in my migraine plugin.

Owyn 05-14-2011 16:37

Re: Change Veritcal aiming (z axis)?
 
actually i've already tried v_angle and it didn't work + view_ofs and m_iFOV, did save them all and then restore but still got the result i've described (lack of vertical aiming)

>>Migraine
in your plugin you only use PunchAngle

ConnorMcLeod 05-14-2011 16:49

Re: Change Veritcal aiming?
 
Oh, then look in mpbhops, angle si saved when player jump and restore in a private function

hlstriker 05-14-2011 20:45

Re: Change Veritcal aiming (z axis)?
 
Quote:

Originally Posted by ConnorMcLeod (Post 1469352)
Store v_angle et restore to angles.
(Or store angles and restore in v_angle, don't remember)

It is get with v_angle and set with angles. Sorry, I should have specified that in my first post :S

Owyn 05-15-2011 04:38

Re: Change Veritcal aiming (z axis)?
 
Quote:

Originally Posted by hlstriker (Post 1469502)
It is get with v_angle and set with angles. Sorry, I should have specified that in my first post :S

thx for clearing this out ^_^

but mpbhops was usefull also, cuz i replaced my old
PHP Code:

VEC_DUCK_HULL_MAX[3]    = { 16.0,  16.0,  18.0 }; 

with new
PHP Code:

VEC_DUCK_HULL_MAX[3]    = { 16.0,  16.0,  32.0 }; 

hope it's correct..


All times are GMT -4. The time now is 04:28.

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