johnfulgor Posted July 17, 2010 Hello all, it seems that GetActorAngle returns always 0 when called with the player TID ... #include "Zcommon.acs" script 1 OPEN { int angle=GetActorAngle(2); /*Player TID is 2*/ print(f:angle); /*Always zero, whichever the orientation is*/ delay(100); angle=GetActorAngle(1); /*Other Object TID is 1*/ print(f:angle); /*This is OK*/ } PLAYER and second object are facing the exact same direction, and are still, but GetActorAngle return different values ... Thanks all! 0 Share this post Link to post
killingblair Posted July 18, 2010 Make it an ENTER script, so it's guaranteed to run when the player enters the game, not when the map is loading. I had a similar problem a few weeks ago. With the ENTER script, you could give your player a TID and get his angle in one script. This is assuming you need the player TID to be a global value for other scripts:#include "zcommon.acs" #define PlayerTID 2 script 1 ENTER { Thing_ChangeTID(0, PlayerTID); int angle = GetActorAngle(PlayerTID); print(f:angle); /* do whatever you need with the angle here */ } Hope this helps! 0 Share this post Link to post