Bergzore Posted April 8, 2013 Share Posted April 8, 2013 I'm making a perk that multiplies sneak attack damage but only if the enemy is facing away. Is GetHeadingAngle the condition I'm looking for, or is that just for cardinal directions N, S, E, W? Link to comment Share on other sites More sharing options...
GrimyBunyip Posted April 8, 2013 Share Posted April 8, 2013 I'm making a perk that multiplies sneak attack damage but only if the enemy is facing away. Is GetHeadingAngle the condition I'm looking for, or is that just for cardinal directions N, S, E, W?it's the Z axis, measured in degrees. if target.getheadingangle(playerref) = 0 then target is facing the player.if it returns 180, then the player is behind the target. Link to comment Share on other sites More sharing options...
Bergzore Posted April 8, 2013 Author Share Posted April 8, 2013 So 180 would be the enemy perfectly facing away, and 0 would be perfectly facing the player? So I would need two conditions. GetHeadingAngle(playerref) => 90 and GetHeadingAngle(playerref) <= 180. Sound right? Link to comment Share on other sites More sharing options...
GrimyBunyip Posted April 8, 2013 Share Posted April 8, 2013 So 180 would be the enemy perfectly facing away, and 0 would be perfectly facing the player? So I would need two conditions. GetHeadingAngle(playerref) => 90 and GetHeadingAngle(playerref) <= 180. Sound right? between 135 and 225,90 to 180 would give you the bottom right 90 degree slice of the clock.or the bottom left, i have no idea if getheadingangle works clockwise or counterclockwise. Link to comment Share on other sites More sharing options...
Bergzore Posted April 8, 2013 Author Share Posted April 8, 2013 Yeah it's the bottom right. Sweet, you're the man. Link to comment Share on other sites More sharing options...
Bergzore Posted April 8, 2013 Author Share Posted April 8, 2013 It seems like no matter what I set it to, it's always the bottom right. Link to comment Share on other sites More sharing options...
Bergzore Posted April 8, 2013 Author Share Posted April 8, 2013 I want the whole back right slice, and the whole back left slice lol. I thought it was 90-270, but that's still just giving me the bottom right. Hmm... Link to comment Share on other sites More sharing options...
GrimyBunyip Posted April 8, 2013 Share Posted April 8, 2013 you probably just need to remove and add the spell/perk again.the game won't always update to your new changes immediately. Link to comment Share on other sites More sharing options...
Bergzore Posted April 8, 2013 Author Share Posted April 8, 2013 I'm aware of that, but no, that's not it. I'm loading a save before the perk was gotten. I've tried different numbers from 0-360 and it doesn't seem to like them. It only registers the back right slice, and if any other degrees are put in, it doesn't give me a multiplier anywhere. I've tried 180-270 to get the back left slice, nothing. Just for shits, I tried 0-90, still nothing. lol wtf... Link to comment Share on other sites More sharing options...
myztikrice Posted April 8, 2013 Share Posted April 8, 2013 Apocalypse spell package has a Destruction spell Glacial Spike that does extra damage if you hit an enemy from behind. You could try looking at that script. Link to comment Share on other sites More sharing options...
Recommended Posts