Forum rules - please read before posting, it can save you a lot of time.
var degrees = actor.DirectionAngle; //returns in degrees the direction your 3d actor is facingvar tmp = Scene.GetNode("CompassHand");tmp.Rotatable = true;tmp.Rotate = degrees;
#include "scripts\base.inc"while (1){ ... the provided code ... Sleep(10); //time how fast it should be updated without any Sleep your game will freeze}
#include "scripts\base.inc"global Line = Game.LoadEntity("entities\new_entity\new_entity.entity");Line.Rotatable = true;while(true){ var mouseY; var alpha; var rad; var deg; mouseY = Game.MouseY-300; alpha = mouseY/200; rad = Math.Asin(alpha); deg = Math.RadToDeg(rad); Line.Rotate = deg; Sleep(20);}