Template Projectile Template!

Vestras

Retired
Reaction score
248
JASS:
        call ReleaseTimer(.t)
        call ReleaseTimer(.ti)
        call ClearTimerStructA(.t)
        call ClearTimerStructA(.ti)


Hmmm... does that actually work correctly? Not 100% sure on how CSSafety works though :\ Wouldn't it be safer to clear the struct before releasing the timer?


And why isn't there a configuration menu? Noone is going to use this if they can't easily configure as much as possible :p

Look at the example. You call a line, like any other template.

And yes, it works completely fine.
 
Reaction score
333
I'm not trying to be harsh but this is pretty badly made.

  • Sin and Cos in the move function? Should be precalculated velocity.
  • Two timers for each projectile? Should be a single timer to handle every projectile (keep them in a list).
  • Structs used internally. Inline these.
  • GroupEnum AND FirstOfGroup loop used. Wasteful.
  • Triggers and attachment used to handle projectile death?
  • Locations used for seemingly no reason? Use coordinates. EDIT: Also these locations appear to be leaking on every move.
  • Using DestroyTimer on a null value. Twice.

These are just a few of the problems I've seen. In a projectile system as simple as this, you should not find yourself using:

  • CreateTimer, NewTimer, etc for each projectile.
  • Any sort of attachment system.
  • Expensive calculations in the move function.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top