img



img

Utility Library


By: jorgenpt
Addon | img 403




Description

___________________________________________________________________________________________________________________________

Description

Utility Library

This is a simple utility library that adds some useful functions for Triggers in the Starcraft 2 Editor. If you have any suggestions for useful features, post them here! :-)

Features

  • Efficient For Loops
  • Is True / Is False boolean Conditions, so you no longer have to do "My Boolean Variable == true", you can say "My Boolean Variable"

What are Efficient For Loops?

See this thread for a description of the problem with the current for loops. Basically, nesting for loops causes an exponential growth of code lines, as each for loop duplicates the contained code twice (to deal with both the case of increasing loops as well as decreasing loops). The thread says 6 nested for loops = 10k lines of code.

This is easily fixed by having two different for-loop actions, one for increasing and one for decreasing. Here's an example of the Trigger Editor with 8 nested for loops using Utility Library:

Here's the code produced: GalaxyScript

While not pretty, it is a lot more efficient than the built-in solution - about 125 lines of code generated! :-)




About Project

Created: October 13th 2023

Updated: October 13th 2023

Project ID: 16632

License: All Rights Reserved

__________________________________________

Game Versions:

1.01.03

1.01.03

1.01.03

1.01.03

1.01.03

__________________________________________

Flavors:

WoW Retail

__________________________________________

Categories

Companions

Battle

__________________________________________

Main File

jorgenpt_Utility Library.zip
  • Release
  • October 13th 2023

    __________________________________________

    Recent File

    jorgenpt_Utility Library.zip
  • Release
  • October 13th 2023

    __________________________________________

    Members

    img
    jorgenpt
    Owner

    __________________________________________

    Report