wingdnosring
New Member
- Reaction score
- 16
Code:
Unit - Set (Last created unit) custom value 0 to Grenade Traj Distance
Sets the distance the Mssile travels every 0.03 seconds. Originally I had this decrease over time, but it was unnecessary, so now it remains constant.
Code:
Unit - Set (Last created unit) custom value 1 to 0.0
Unit - Set (Last created unit) custom value 2 to 0.0
1 was going to be used for drops in height, but I've since removed it, so just ignore it.
2 records the total distance of a grenade as it travels. So every 0.03 seconds it adds custom value 0 to itself.
Code:
Unit - Set (Last created unit) custom value 4 to (Grenade Traj Distance * (Grenade Traj Distance / 0.06))
The distance of the parabola's vertex.
Code:
Unit - Set (Last created unit) custom value 3 to (((Ground height at Shooter Positions[Grenade Traj Creation Loop]) + 0.6) + ((((Custom value 4 of (Last created unit)) * (0.0 - (Sin((Camera Pitch of Player(Grenade Traj Creation Loop)))))) / (90.0 + (Sin((Camera Pitch of Player(Grenade Traj Creation Loop)))))))
The height of the parabola's vertex.
Code:
Unit - Set (Last created unit) custom value 5 to (((0.6 + (Air height at Shooter Positions[Grenade Traj Creation Loop])) - (Custom value 3 of (Last created unit))) / (Power((0.0 - (Custom value 4 of (Last created unit))), 2.0)))
The parabola's width.
I have already changed 5 to be an absolute value, so the grenade trajectory is perfect if the player is looking upwards. But when he looks downwards, it gets stuck in the sand about a foot in front of him. So, there's still work to be done.
And I have no idea what that action you posted does :S.