Quote:
Originally Posted by Rachnus
|
Dude you are my master. The movement works fine. But other problems occured:
1. There is a sound of C4 "moving"
2. When they fall from the edge there is a chance they flip over so we can see only feet of ghouls
3. Now my angleEntity function doesnt work, tried it on ghoul and C4 parent(and both), no results. I
Code:
stock void AngleEntity(int ent, int ent2){
float angle[3];
float position[3];
float position2[3];
GetEntPropVector(ent, Prop_Send, "m_angRotation", angle);
GetEntPropVector(ent, Prop_Send, "m_vecOrigin", position);
GetEntPropVector(ent2, Prop_Send, "m_vecOrigin", position2);
float x = position2[0] - position[0];
float z = position2[1] - position[1];
float radians = ArcTangent2(z, x);
angle[1] = radians * (180 / 3.14);
SetEntPropVector(ent, Prop_Send, "m_angRotation", angle);
}
I assume that problem 1 and 2 can be solved by adding some noclip or movetype to the parent, but i dont know any DispatchKeyValue values (such as "targetname" for name)
And the problem 3 maybe could be solved by putting other model insted of C4 that can handle both angles and velocity?
I'd glady recive any kind of help from you