- Joined
- Jul 19, 2010
- Messages
- 309
Hey guys, I'm making my own projectile system in GUI and I made something that works really well and handles any projectile I load into it, but I am curious if I made an efficient system or if it is trash compared to something else. Please peruse the below function that sets the pitch of the projectile travelling along the arc and let me know if you think it should be different, thanks! (Don't count leaks in the efficiency, I haven't de-leaked it yet.)
Note: PjcArc is a multiplier, when set at 1.00 the arc will appear as the upper half of a circle, when set to .5 it will appear as if the circle were only half as tall.
One more note: The pitch of the projectile is recalculated every .02 seconds, as is the DistanceLeft to travel.
Note: PjcArc is a multiplier, when set at 1.00 the arc will appear as the upper half of a circle, when set to .5 it will appear as if the circle were only half as tall.
One more note: The pitch of the projectile is recalculated every .02 seconds, as is the DistanceLeft to travel.
-
Arc
-
Events
-
Conditions
-
Actions
-
Set PjcArc[GenericLoopCount] = 1.00
-
Set FullDistance[GenericLoopCount] = Distance between Start Cast and Target of Cast
-
Special Effect - Set Pitch of ProjectileVisual[GenericLoopCount] to: (Radians(((-90.00 x PjcArc[GenericLoopCount]) + ((180.00 x ((FullDistance[GenericLoopCount] - DistanceLeft[GenericLoopCount]) / FullDistance[GenericLoopCount]
-
-