Jump to content

Referencing the Player in scripts.

Recommended Posts

Posted (edited)

I've noticed that when making scripts, there isn't an easy way to reference the player all the time. Like for example, right now I am trying to make a staff that throws an entity. The entity should have a rotation that is determined by which way the player is facing. This is hard to do without referencing the player position because I have to write the script in the entity template for the object so that it will rotate when I execute the throw command. Anyway, is there any way that I'm overlooking on how to get player position and rotation from any script?


Edit: I did figure what I was wanting to do eventually, and let me tell you, it was so much more simple than my brain was telling me. All I had to do was rotate the object before I set it to the Entity Template. Then it will be thrown in that rotation... yay me.. 

Edited by Azazil00

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now