• 0

    posted a message on Custom Galaxy Script Editor

    Yeah - I havent released it yet - v1.1 doesn't catch everything

    Posted in: Third Party Tools
  • 0

    posted a message on Custom Galaxy Script Editor

    By all means, keep bitching :)

    I'll try looking at improving the autocomplete.. Should be pretty simple if I write my own instead of using the one from the text box library.. So far I have been focusing on catching the rest of the errors, but I think I got that done, so I'll start looking at a new autocomplete system.. tomorrow :)

    Posted in: Third Party Tools
  • 0

    posted a message on Custom Galaxy Script Editor

    What do you mean the autocompletion should include functions and parameters? It does include custom functions/locals/globals/structs. It will need to parse the imput before it can show the custom functions though. If you loaded the default skeleton, the program will parse everything, to collect all defined methods, structs, fields and locals. Everything includes whatever you included, such as NativeLib.galaxy, aswell as everything included in that file and so on. Parsing all that does take some time. After includes have been parsed, they get cached though, so next time you change your code, it wont parse includes again.

    In the version im working on now I added a status bar to tell you how far it has come parsing the code - hope that helps once I release it. Also, I might put parsed versions of the default libraries on the disc, so they wont need to be parsed at all.

    Posted in: Third Party Tools
  • 0

    posted a message on Custom Galaxy Script Editor

    Every time I start making a map, I get too fustrated with the custom script editor, so I decided to make my own.

    It has features like syntax highlighting, autocompletion of keywords aswell as stuff defined by the user, and it reports errors

    Hope someone other than me can find it usefull.

    http://www.sc2mapster.com/assets/beiers-galaxy-script-editor/

    If you find any bugs, or have a suggestion for extra features, please post about them ;)

    Posted in: Third Party Tools
  • 0

    posted a message on Anyways to have an attack stay locked on without the attack dying?

    ooh.. I misunderstood you then.. I thought you wanted the unit to be able to attack people in the fog, but not initiate an attack unless the target is in range

    Posted in: Miscellaneous Development
  • 0

    posted a message on Kerrigan graphics issue - Missing actor/model?

    I have had some problems like this. Removing some depencies worked for me - try only going with (mod) and (campaign).

    Posted in: Miscellaneous Development
  • 0

    posted a message on Button Problem

    Did you modify the price for siege tank (tank mode) or siege tank (siege mode)? If so, make sure that it is the same price on both units.
    If it is the same price, the only other place I can think of a price being set is in the morph abilities' costs field. But people are usually not surprised over the effects of modifying those fields.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Anyways to have an attack stay locked on without the attack dying?

    I made a solution that consists of two triggers, a weapon, and an ability.

    First, trigger triggers when one of our unit type starts attacking a target.
    I add the unit to a unit group of units who are currently attacking. I then remove the weapon from the attacker, and add a dummy weapon. This dummy weapon is just there so the player will see the correct stats when hovering over the weapons.
    Next, I order the unit to use an ability I called wait. It's an effect - instant ability with no effect, but an extremely long cast time. I use it to force the unit to stand still - like I mentioned, that would be a problem with this approach.
    Next, for as long as the attacker is in the unit group of attacking units, I make the attacker face the target, apply the attack effect that the weapon would normally apply, tell the unit to play the attack animation, and wait for a duration equal to the normal cooldown of the weapon.
    If the target dies, I remove the attacker from the unit group.
    When the attacker is no longer in the unit group, I give it back it's original weapon.

    I have another trigger that listens for when a unit in the unit group is ordered to do anything. If that happens, I remove it from the unit group to stop the previous trigger from attacking.

    I made an example map.

    One thing Im unhappy about is that if the unit was attacking normally, it would keep on turning towards the enemy. In this solution, it will only turn to the enemy when it is ready to attack. It is possible to make the unit face the target at very small intervals, but I can't think of a way to make the unit play the turn animation aswell as the attack animation at the same time. As a result, the unit's feet would be standing still while the unit is (constantly) rotating - that really looks ugly. If anyone got a solution there - speak up ;)

    Also, note that if your attacker fires projectiles, they are belonging to the attacker, and as a result he will be able to see where they are going. So eaven if the target is miles into the fog, the attacking player will be able to follow the projectiles with his camera and see where the target is.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Connecting Units

    just make those functions.. you can get the x, y, and z of a point (z is the height), and you can create a new point to return

    Posted in: Miscellaneous Development
  • 0

    posted a message on Connecting Units

    yes.. I posted that in my 1st post

    that one refferences a function called Dot, which is just the dot product between two vectors

    Posted in: Miscellaneous Development
  • 0

    posted a message on Connecting Units

    hehe.. indeed it is :)
    Like I said in my first post, I just split it into triangles

    Point In Square
        Options: Function
        Return Type: Boolean
        Parameters
            point = No Point <Point>
            s1 = No Point <Point>
            s2 = No Point <Point>
            s3 = No Point <Point>
            s4 = No Point <Point>
        Grammar Text: Point In Square(point, s1, s2, s3, s4)
        Hint Text: (None)
        Custom Script Code
        Local Variables
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Or
                        Conditions
                            (Point In Triangle(point, s1, s2, s3)) == true
                            (Point In Triangle(point, s1, s2, s4)) == true
                            (Point In Triangle(point, s1, s4, s3)) == true
                Then
                    General - Return true
                Else
                    General - Return false

    You could say that I only need to split it into 2 triangles, but then it matters in what order the points are given to the function. Also, note that if you do a funky square - so one of the angles is above 180 degrees, this method will include an area outside the square.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Effect with a chance to happen?

    I think I would implement it in triggers.. but you could use multiple set effects that are set to random to achive a chance under 1 out of 8

    Posted in: Data
  • 0

    posted a message on Connecting Units

    Rather then make a record for a vector, I use points. This way I can pass them to a function and return them. So, AvgPoints takes two "vectors" and returns the avrage of those two (v1 + v2)/2.

    Damage unit is also a custom function. You should find it under the util folder.

    DamageUnit
        Options: Action
        Return Type: (None)
        Parameters
            target = No Unit <Unit>
            source = No Unit <Unit>
            ammount = 0.0 <Real>
        Grammar Text: DamageUnit(target, source, ammount)
        Hint Text: (None)
        Custom Script Code
        Local Variables
        Actions
            Catalog - Set value of Effects "TriggerDamage" "Amount" for player (Owner of source) to (String(ammount) with Any Precision decimal places)
            Environment - Execute Trigger Damage on target from source

    Obviously I have a damage effect in the data editor called TriggerDamage

    As for the condition..
    (Point In Square(
    //The point to check
        (Position of (Picked unit)),
    //Four points making up the square
        ((Position of (Triggering unit)) offset by 1.0 towards ((Facing of (Triggering unit)) + 90.0) degrees),
        ((Position of (Triggering unit)) offset by 1.0 towards ((Facing of (Triggering unit)) - 90.0) degrees),
        ((Position of (Triggering ability target unit)) offset by 1.0 towards ((Facing of (Triggering ability target unit)) + 90.0) degrees),
        ((Position of (Triggering ability target unit)) offset by 1.0 towards ((Facing of (Triggering ability target unit)) - 90.0) degrees))
    == true

    Posted in: Miscellaneous Development
  • 0

    posted a message on Unit creation with random stats

    You could make a stackable buff for each stat you want to vary, where this buff adds one to the stat.
    Then make a trigger that adds a random number of these buffs when the unit is created.

    Posted in: Data
  • 0

    posted a message on Upgrade Requirements

    You need 2 requirements for that;

    "Upgrade 1 Requirements"
    Show
          Equals
               Count Upgrade (Upgrade from building 1) Queued or Better
               Constant 0

    "Upgrade 2 Requirements"
    Use
          Equals
               Count Upgrade (Upgrade from building 1) Completed
               Constant 1
    Show
          Equals
               Count Upgrade (Upgrade from building 2) Queued or Better
               Constant 0

    You dont really need the equals for all of them, since 0 is considered false, and everything else is considered true, but I think this is easier to understand.

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