So I came here after attempting to solve this alone for like an hour.
I have a player (that can rotate of course), that player will cause an event (hook) that will cause projectiles to come out of his left and right "wing" (arms).
Example:
Left and right arrows being where the projectile will launch from (about 16 or 32 pixels from the player) and the circle being the player (with his gun as an arrow (where he's pointing)).
Currently with my random attempts of using random math functions I've made it this far:
1
2
3
4
2
3
4
local rot = player(p, 'rot') 					 parse('spawnprojectile ' .. p .. ' 48 ' .. player(p, 'x') - ( _math.tan(rot) * 62 ) .. ' ' .. player(p, 'y') .. ' 320 ' .. rot) parse('spawnprojectile ' .. p .. ' 48 ' .. player(p, 'x') + ( _math.tan(rot) * 62 ) .. ' ' .. player(p, 'y') .. ' 320 ' .. rot)
_math., but you can use
math..)
Of course, that doesn't work otherwise I wouldn't post this
Or would I?