This is definitely a bug with the editor - if there was an error, why would the compiler allow it? Are there any workarounds?
EDIT: Well, seems like a solution is to provide an absolute path, such as "C:/Users/........"; definitely not a clean solution, hopefully this bug will be fixed soon.
Took me a while to have it installed, but it works! Thanks so much for this really helpful and awesome tool! [P.S. you might wanna put it in Third-Party tools section]
The only problem is, how do I get the syntax checking to work?
Also, is it possible to add support for /* comment */ comments, + + increment, and defining variables anywhere in the function, when saving the .galaxy file? I think it'll be pretty helpful.
That happens to me too. When the editor starts up and I'm asked if I want to continue without the HotS and LotV dependencies, I say no. Then, I just click "Open" at the top left and find my document. If I open indirectly, everything is fine.
This is the fundamental problem with normal arrays.
It really sucks when for example, you need to keep track of the points at which some spells are cast. If you use normal arrays, then you have to create an array of points with a size of say, 100. This however, is not the best way to keep track of these points in terms of performance. Plus, what if there are more than 100 spells being cast simultaneously?
Have you also ever wanted to create a scoreboard where the highest scores come first? Sure, you could always open up Ctrl+Shift+L and look under Built-in > Templates and check out the sorting algorithms there, but isn't it a little troublesome and messy to have to copy from there all the time?
To save you all the hassle, I have created a library with Improved Arrays.
Benefits of using Improved Arrays
Improved Arrays are flexible like in JavaScript, or even PHP - you can freely set any value in the array and the array size is modified.
In addition to fundamental functions such as Create, Length, Exists, Type, Set, Get, Push, there are many more features such as Split String into Array, Join Array into String, Search Array Value, Index of Greatest/Lowest value in Array, Delete Array Key, Move Array Value, Swap Array Values, Reverse Array, Sort Array, Shuffle Array, Merge Arrays and so on!
Has support for both GUI and Galaxy code
Built-in and convenient looping function
A single array can store different types of array values, so you can have an array of Unit and Ability Command values or something like that (though not encouraged)
If you are experienced with the editor and understand the library's code, you can make some functions of your own too!
Current Support
Improved Arrays are made with Data Tables and supports both GUI and Galaxy users.
This set of code results in the array having the values: [2, 4, 7, 8, 10, 12]
Get Array Value
Returns the array value of a specified index of an existing array. There are various "get" actions based on the type of array value you are trying to get.
Type: Function
Parameter(s): Array Name (string), Array Index (integer)
GUI:
Get Array Value (Integer)
Get Array Value (Real)
Get Array Value (Ability Command)
Get Array Value (Boolean)
Get Array Value (Point)
Get Array Value (Region)
Get Array Value (String)
Get Array Value (Unit)
Get Array Value (Unit Group)
Galaxy:
GetInt
GetFixed
GetAbilCmd
GetBool
GetPoint
GetRegion
GetString
GetUnit
GetUnitGroup
Length of Array
Returns an integer of the number of elements (the size) of an existing array.
To use the library in your map, follow these steps:
Find the "Mods" folder in the StarCraft II folder (e.g. C:\Program Files (x86)\StarCraft II\Mods)
Put the downloaded mod "ImprovedArrays.SC2Mod" in there
In your map in SC2Editor, go to File > Dependencies > Add Other, then select ImprovedArrays.SC2Mod
If you cannot find ImprovedArrays.SC2Mod in that box, try changing the "Directory" from the dropdownlist in that dialog box, or restart the editor
Changelog
Version 1.0 (Apr 17) : initial release
Version 1.1 (Apr 18) : library is now better organised and imported as a dependency in order to retain all the grammar/hint texts
Overview
Any questions / suggestions / feedback / bug report? Also note that this library is still under development and I will update it with new features (based on YOUR suggestions) soon.
Use the dropdownlist on the top-left to control which GUI action/condition/event you wish to view, and in the middle panel the information about the selected item will appear. For presets parameters, you can actually simply click on the preset and it will generate a table with information about possible preset options.
This is a good and convenient tool for beginners switching from GUI to Galaxy, though there are some things that you have to research on your own about such as UnitFilterStr, etc.
Please tell me if there are any bugs / suggestions :D
(P.S. I had actually made this in like an hour while working on a project on creating an online triggers editor, where the editor will be able to import data generated there, which is very possible. The code for this online triggers is really messy and I paused my work on it, if anyone here knows javascript and jquery and lend a hand I will really appreciate it.)
Search where? On this site or editor? :P Anyway I searched both and didn't get much.
Maybe another solution is to ignore all damage from allies? Any idea how to achieve this using data editor with a buff, to make ally's attacks towards this unit deal no damage?
0
Good work {:'-D
0
Looks like a lot of effort put into this, good job :)
It'll definitely be a lot of fun looking at the source code
0
Suppose I have a map file at "a/b/Map.SC2Map", and I have a galaxy file at "a/c/Main.galaxy".
In order to link the .galaxy file to the .sc2map file, I can add a custom script to the map file containing:
and it compiles successfully. (I honestly don't know why, but it works...)
However, when I test the map in-game, it throws an error:
This is definitely a bug with the editor - if there was an error, why would the compiler allow it? Are there any workarounds?
EDIT: Well, seems like a solution is to provide an absolute path, such as "C:/Users/........"; definitely not a clean solution, hopefully this bug will be fixed soon.
0
Took me a while to have it installed, but it works! Thanks so much for this really helpful and awesome tool! [P.S. you might wanna put it in Third-Party tools section]
The only problem is, how do I get the syntax checking to work?
Also, is it possible to add support for /* comment */ comments, + + increment, and defining variables anywhere in the function, when saving the .galaxy file? I think it'll be pretty helpful.
0
Vorazun has a mother called Raszagal, so yes protoss have children
0
@TheSC2Maniac: Go
My locale is already enUS...
0
How do i fix it? I've already tried restarting, different forms of opening the document, etc but doesnt work...
0
Sounds interesting, I might be able to help with some triggers if you guys are still looking for anyone :)
0
Worked, thnks a lot
0
If you want an array that can be dynamically manipulated to change in size with many useful built-in functions, this trigger library is for you!
Contents
Arrays' sizes cannot change
This is the fundamental problem with normal arrays.
It really sucks when for example, you need to keep track of the points at which some spells are cast. If you use normal arrays, then you have to create an array of points with a size of say, 100. This however, is not the best way to keep track of these points in terms of performance. Plus, what if there are more than 100 spells being cast simultaneously?
Have you also ever wanted to create a scoreboard where the highest scores come first? Sure, you could always open up Ctrl+Shift+L and look under Built-in > Templates and check out the sorting algorithms there, but isn't it a little troublesome and messy to have to copy from there all the time?
To save you all the hassle, I have created a library with Improved Arrays.
Benefits of using Improved Arrays
Current Support
Improved Arrays are made with Data Tables and supports both GUI and Galaxy users.
Currently supports these types of values:
Current functions / features:
Documentation
Create Array
All arrays must be initialized before they can be used.
Example
GUI:
Galaxy:
Both sets of code initializes an array named "array_name".
Set Array Value / Push Array Value
Set and push actions can modify the values of an existing array. (Note that all arrays begin with index 0)
Set Actions
Sets the value of a particular index of an existing array. There are various "set" actions separated based on the type of array value you want to set.
GUI:
Galaxy:
Push Actions
Adds a value to the end of an existing array. There are various "push" actions separated based on the type of array value you want to push.
GUI:
Galaxy:
Example
GUI:
Galaxy:
This set of code results in the array having the values: [2, 4, 7, 8, 10, 12]
Get Array Value
Returns the array value of a specified index of an existing array. There are various "get" actions based on the type of array value you are trying to get.
GUI:
Galaxy:
Length of Array
Returns an integer of the number of elements (the size) of an existing array.
Example
GUI:
Galaxy:
Both sets of code will debug "6" as this array consists of [2, 4, 7, 8, 10, 12].
For Each Index in Array
Loops through an array in order, setting a specified integer variable to the current key each round.
Example
GUI:
Galaxy:
Both sets of code produces this result in the debug area:
Set Array Value to Array Value
Sets the value of a specified index of an array to another specified value regardless of type.
(That's all the documentation for now, more will be coming up soon)
Download / Installation
You can download the library on Link Removed: http://www.mediafire.com/download/gv1duybbiq8jv6v/ImprovedArrays.SC2Mod .
To use the library in your map, follow these steps:
Changelog
Overview
Any questions / suggestions / feedback / bug report? Also note that this library is still under development and I will update it with new features (based on YOUR suggestions) soon.
Thanks!
0
http://www2.hci.edu.sg/T0236874E/sc2editor/
Use the dropdownlist on the top-left to control which GUI action/condition/event you wish to view, and in the middle panel the information about the selected item will appear. For presets parameters, you can actually simply click on the preset and it will generate a table with information about possible preset options.
This is a good and convenient tool for beginners switching from GUI to Galaxy, though there are some things that you have to research on your own about such as UnitFilterStr, etc.
Please tell me if there are any bugs / suggestions :D
(P.S. I had actually made this in like an hour while working on a project on creating an online triggers editor, where the editor will be able to import data generated there, which is very possible. The code for this online triggers is really messy and I paused my work on it, if anyone here knows javascript and jquery and lend a hand I will really appreciate it.)
0
@Alevice: Go
This sounds promising, will try it out
0
Continued messing around with dependencies and all but it still does not work. Does anyone have an up-to-date solution?
0
@FunkyUserName: Go
Search where? On this site or editor? :P Anyway I searched both and didn't get much.
Maybe another solution is to ignore all damage from allies? Any idea how to achieve this using data editor with a buff, to make ally's attacks towards this unit deal no damage?
0
@FunkyUserName: Go
Hmm can't seem to hide an actor for a player. I tried Send Actor Message and SetVisible but it doesn't seem to work