AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Engine] entity_set_vector info. (https://forums.alliedmods.net/showthread.php?t=272066)

CodingIsHard 09-23-2015 09:28

[Engine] entity_set_vector info.
 
Long story short, i've been browsing the /api/ and .inc file and left with no explanation so probably one of you guys will help me out..

PHP Code:

entity_set_vector(iIndexiKey, const Float:vNewVector[3]); 

iIndex = player
iKey = ?
vNewVector = ? (read_data(1-3) ?)

Could any of you make an example on how to turn a player's view (and body/model) 20 degrees to left/right?

CodingIsHard 09-23-2015 12:03

Re: [Engine] entity_set_vector info.
 
Solved, sorry for wasting bytes. :)

HamletEagle 09-23-2015 13:33

Re: [Engine] entity_set_vector info.
 
When you find the solution make sure to post it, it may help the others who have the same issue.

CodingIsHard 09-25-2015 05:14

Re: [Engine] entity_set_vector info.
 
Quote:

Originally Posted by HamletEagle (Post 2346231)
When you find the solution make sure to post it, it may help the others who have the same issue.

I was considering posting it but then i forgot since i had so little time.
This was the solution i managed to use for my function what i was looking for.

PHP Code:

new Float:vecViewAngles[3];
entity_get_vector(idEV_VEC_anglesvecViewAngles);
vecViewAngles[1] += float(20);
entity_set_vector(idEV_VEC_anglesvecViewAngles);
entity_set_int(idEV_INT_fixangle1); 

Hope it helps, whoever needs it.


All times are GMT -4. The time now is 22:05.

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