Spell Request [Difficulty: Hard]: Magnet Tower

Tom Jones

N/A
Reaction score
437
I've written everything from scratch, that's just my naming convention.

Indeed, you may get what you want with regular jass, but that is no excuse as to not make it more efficient.

Some comments on your trigger:
You use an ability and a trigger to simulate a timer! I really do wonder why you didn't use a timer?
Triggeractions do not get destroyed with DestroyTrigger(...), which means that they leak. Note that I my code, I only add a condition and then use that condition to delegate the work out to other functions.
It's not very configurable.
You use way too many BJ functions, the number of acceptable BJ functions can be counted on three fingers.
In your pullback thingie, you set the victims position four times. Why? The thread get executed lightning fast, you'll only effectively see the last position your setting.
I know GetTriggerUnit() is constant and extremely fast, but there is still no reason as to not assign it a variable on your pullback thingie.
 

ThePlague

New Member
Reaction score
14
Indeed, you may get what you want with regular jass, but that is no excuse as to not make it more efficient.
besides my minor (not really) oversights would it actually run worse?

You use an ability and a trigger to simulate a timer! I really do wonder why you didn't use a timer?
was easiest way i could think of to avoid using any global variables.

Code:
Triggeractions do not get destroyed with DestroyTrigger(...), which means that they leak. Note that I my code, I only add a condition and then use that condition to delegate the work out to other functions.
Really? Seems odd. How can I get around this? Anyway i can only remove events or conditions or actions from a trigger?

It's not very configurable.
It was I just didnt have a neat section at the top to edit constants

You use way too many BJ functions, the number of acceptable BJ functions can be counted on three fingers.
I only count 3 in mine :D

In your pullback thingie, you set the victims position four times. Why? The thread get executed lightning fast, you'll only effectively see the last position your setting.
whoops minor mistake supposed to be a small wait in between each one. Although i suppose it woulda been better if i just looped insteada copy pasting 4 times


I know GetTriggerUnit() is constant and extremely fast, but there is still no reason as to not assign it a variable on your pullback thingie.
I heard somewhere game references triggering unit faster than anything else. So theres no real benefit.

btw im looking at the NewGen stuff right now.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top