Problem: I am unable to store the direction of something in a variable. As an example, the player's current head rotation.
I am trying to make a simple script that turns an egg that is thrown into an ender dragon fireball which will launch like a regular fireball. However, I cannot seem to be able to store the direction of the player into a variable so that I can tell the program to push the fireball in said direction.
Code example:
on shoot:
if projectile is an egg:
cancel event
set {_player} to shooter of projectile
set {_loc} to location of projectile
spawn dragon fireball at {_loc}
set {_dir} to direction of player ← ← ←
push last spawned entity forward in direction {_dir} at speed 1 ← ← ←
It's been quite a while since I've messed around with skript - if there was an update and this no longer works, lmk. thx!