• 0

    posted a message on InsaneAI Library

    Good work {:'-D

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on InsaneAI Library

    Looks like a lot of effort put into this, good job :)

    It'll definitely be a lot of fun looking at the source code

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on include external files not working in-game

    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:

    include "../../../c/Main.galaxy";
    

    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:

    Scri: Script compile error: MapScript.galaxy (25), Include file not found
    Scri: Script code: include "../../../c/Main.galaxy";
    Scri: Script load failed: include file not found
    

    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.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Sublime Text plugin

    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.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Do Protoss have children?

    Vorazun has a mother called Raszagal, so yes protoss have children

    Posted in: General Chat
  • 0

    posted a message on All editor elements have no names?

    @TheSC2Maniac: Go

    My locale is already enUS...

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on All editor elements have no names?

    http://i.imgur.com/kcLkz1j.png

    How do i fix it? I've already tried restarting, different forms of opening the document, etc but doesnt work...

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Halo: Recollection (Campaign)

    Sounds interesting, I might be able to help with some triggers if you guys are still looking for anyone :)

    Posted in: Project Workplace
  • 0

    posted a message on been having editor problems. is it because of my dependency?
    Quote from PowerUnderwhelming: Go

    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.

    Worked, thnks a lot

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on Improved Arrays

    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

    • 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.

    Currently supports these types of values:

    • integer
    • real
    • ability command
    • boolean
    • point
    • region
    • string
    • unit
    • unit group

    Current functions / features:

    Documentation

    Create Array

    All arrays must be initialized before they can be used.

    • Type: Action
    • Parameter(s): Array Name (string)
    • GUI: Create Array
    • Galaxy: Create(string array_name);

    Example

    GUI:

    GUI Create

    Galaxy:

    Create("array_name");
    

    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.

    • Type: Action
    • Parameter(s): Array Name (string), Array Index (integer), Array Value (any)

    GUI:

    • Set Array Value (Integer)
    • Set Array Value (Real)
    • Set Array Value (Ability Command)
    • Set Array Value (Boolean)
    • Set Array Value (Point)
    • Set Array Value (Region)
    • Set Array Value (String)
    • Set Array Value (Unit)
    • Set Array Value (Unit Group)

    Galaxy:

    • SetInt
    • SetFixed
    • SetAbilCmd
    • SetBool
    • SetPoint
    • SetRegion
    • SetString
    • SetUnit
    • SetUnitGroup

    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.

    • Type: Action
    • Parameter(s): Array Name (string), Array Value (any)

    GUI:

    • Push Array Value (Integer)
    • Push Array Value (Real)
    • Push Array Value (Ability Command)
    • Push Array Value (Boolean)
    • Push Array Value (Point)
    • Push Array Value (Region)
    • Push Array Value (String)
    • Push Array Value (Unit)
    • Push Array Value (Unit Group)

    Galaxy:

    • PushInt
    • PushFixed
    • PushAbilCmd
    • PushBool
    • PushPoint
    • PushRegion
    • PushString
    • PushUnit
    • PushUnitGroup

    Example

    GUI:

    GUI Set/Push

    Galaxy:

    Create("IntArr");
    PushInt("IntArr", 2);
    PushInt("IntArr", 4);
    PushInt("IntArr", 6);
    PushInt("IntArr", 8);
    PushInt("IntArr", 10);
    SetInt("IntArr", 2, 7);
    SetInt("IntArr", 5, 12);
    

    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.

    • Type: Function
    • Parameter(s): Array Name (string)
    • GUI: Length of Array
    • Galaxy: Length(string array_name);

    Example

    GUI:

    GUI Length

    Galaxy:

    Create("IntArr");
    PushInt("IntArr", 2);
    PushInt("IntArr", 4);
    PushInt("IntArr", 6);
    PushInt("IntArr", 8);
    PushInt("IntArr", 10);
    SetInt("IntArr", 2, 7);
    SetInt("IntArr", 5, 12);
    TriggerDebugOutput(1, IntToText(Length("IntArr")), true);
    

    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.

    • Type: Action
    • Parameters: Array Name (string), Current Key (integer variable)
    • GUI: For Each Index in Array
    • Galaxy: (none) [use a for loop]

    Example

    GUI:

    GUI For Each Index

    Galaxy:

    // Variables
    int k = 0;
    // Setup Array
    Create("IntArr");
    PushInt("IntArr", 2);
    PushInt("IntArr", 4);
    PushInt("IntArr", 6);
    PushInt("IntArr", 8);
    PushInt("IntArr", 10);
    SetInt("IntArr", 2, 7);
    SetInt("IntArr", 5, 12);
    // [2, 4, 7, 8, 10, 12]
    
    // Loop
    for(; k < Length("IntArr"); k += 1) {
            TriggerDebugOutput(1, StringToText(IntToString(k) + ": " + IntToString(GetInt("IntArr", k))), true);
    }
    

    Both sets of code produces this result in the debug area:

    0: 2
    1: 4
    2: 7
    3: 8
    4: 10
    5: 12
    

    Set Array Value to Array Value

    Sets the value of a specified index of an array to another specified value regardless of type.

    • Type: Action
    • Parameter(s): Array Name 1 (string), Array Index 1 (int), Array Name 2 (string), Array Name 2 (int)
    • GUI: Set Array Value to Array Value
    • Galaxy: SetValToVal(string array1, int index1, string array2, int index2)

    (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:

    • 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.

    Thanks!

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on SC2 Simple Online GUI Functions to Galaxy Converter

    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.)

    Posted in: Third Party Tools
  • 0

    posted a message on Make standard multiplayer units be the same as in melee games, with campaign dependency

    @Alevice: Go

    This sounds promising, will try it out

    Posted in: Data
  • 0

    posted a message on Make standard multiplayer units be the same as in melee games, with campaign dependency

    Continued messing around with dependencies and all but it still does not work. Does anyone have an up-to-date solution?

    Posted in: Data
  • 0

    posted a message on Make unit untargetable for some players?

    @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?

    Posted in: Triggers
  • 0

    posted a message on Make unit untargetable for some players?

    @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

    Posted in: Triggers
  • To post a comment, please or register a new account.