Galaxy Editor Pitfalls

Discussion in 'Starcraft 2 (SC2) Editor Help' started by Strilanc, Jun 22, 2010.

  1. Strilanc

    Strilanc Veteran Scripter

    Ratings:
    +42 / 0 / -0
    Learning to use a new editor is an exercise in frustration and discovery. I figured we should make a list of "gotchas" that new editors might also run into.

    I'll start. Post your own below and I'll include the good ones in the main post.

    - Unlike WC3 and SC1, start locations are not a unit. You create start locations using the Point layer and assign them under Player Properties. This actually makes a lot of sense, when you think about it.
    - Units don't have an actor property, it's the other way around. That's why duplicating a unit without duplicating its actor causes it to have no graphics (the actor points to only the old unit).
    - A unit's cost (time/minerals/etc) is not specified in the unit data, but in the training ability data. For example, the SCV cost is specified in the command center's Train ability.
    - Maps start with a relatively thick border which is out of bounds. So if you make a really small map you won't be able to place any units unless you modify the bounds.
    - If a unit has a behavior with 0 points it will fail the "has behavior" condition, which would be alright except that 0 points is the default. Increase behaviors' min point value past 0 to workaround the issue.
    - The "pick each" loops seem more convenient, because you don't have to introduce a local variable, but they can't be nested. Don't use them, unless you like surprise errors when calling functions that happen to use the same loop.
    - If you duplicate a unit (and its actor) your unit shows up as a red sphere, because the actor's model paths are updated to include the new unit's id (and no such models exist). Set the paths back to see the original unit.
     
  2. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
    -There's two unit loops: For loop and Pick loop
    -The unit Pick loop cannot be nested - don't use it.
     
  3. Strilanc

    Strilanc Veteran Scripter

    Ratings:
    +42 / 0 / -0
    Haha, that one caught me too. They trick you by acting all convenient then go for the kill. Added.
     
  4. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
    Never had problems with them myself. Seems that wingdnosring had, though =D
    EDIT:
    -Checking the "custom script" flag for a function converts it to the "customscriptaction", rather than making galaxy available.
    -There is two GUI function types: "function" and "action"
    -The GUI "function" cannot use custom script. (only as a customscriptaction)
     
  5. black.sheep

    black.sheep Active Member

    Ratings:
    +24 / 0 / -0
    Hey, do any of you get the SC2 editor runing in the background after closing all windows?
     
  6. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
    Please elaborate.
     
  7. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    I believe he means the .exe process is still running on the task manager, even though there is no active editor windows on his taskbar.

    @Black.sheep, this only occurs to me whenever I have any of the terrain, data, or the trigger modules open. As soon as you close all of these, the process exits.
     
  8. rover2341

    rover2341 Is riding a roller coaster...Wee!

    Ratings:
    +114 / 0 / -0
  9. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
    Changing pitch and roll of the camera is easy, and changing that of a model not being simple isn't really a "pitfall" rather than a limitation.
     
  10. Switch33

    Switch33 New Member

    Ratings:
    +12 / 0 / -0
    It is a pitfall for sc2 when wc3 allowed it for units.
     
  11. D.V.D

    D.V.D Make a wish

    Ratings:
    +73 / 0 / -0
    Pitch yes, roll no. Roll you had to make units face custom models with a specif roll and to get all possible rolls, u would need 360 animations of that unit each with a different roll or 360 units each with a different roll.
     
  12. overload119

    overload119 New Member

    Ratings:
    +5 / 0 / -0
    - Custom script is a joke, it lags like a mofo
    - Collapsed If/Then/Else will always be uncollapsed when you refresh the trigger
     
  13. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    - Lack of Documentation. Fix this, and we will come up with workarounds for all the previously mentioned.
     
  14. Renendaru

    Renendaru (Evol)ution is nothing without love.

    Ratings:
    +309 / 0 / -0
    Do you mean for Starcraft 2? There's documentation for the natives...
     
  15. Ancanus

    Ancanus [ancanus@TheHelper.net]# _

    Ratings:
    +54 / 0 / -0
    My mistake, I meant in the data editor.
     
  16. Dan

    Dan The New Helper.Net gives me great Anxiety... o.O;;

    Ratings:
    +160 / 1 / -0
    I fail to understand how this is a pitfall. Functions must return a value and actions do not; however, an action definition is the same as a function of type action. A function of type action CAN return a value if you would like it to, though. Functions are undoubtedly what they started with, and gave them the capabilities of being "functions" "actions" "condition" and "events"... but then they split actions and conditions off for us to use and have a different picture. I think of that as convenience.

    Feel free to explain. :) I don't understand what you mean...
     
  17. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
    Because a) both get compiled the very same way (not considering custom script) and b) both are callable from any place using customscript and c) there is no such difference in galaxy and d) it is just counter intuitive.

    Pitfall = unexpected behaviour, not "bad behaviour" or "limitation".

    If I create a function and give it a return type, I expect it to be callable from any place where it would be semantically appropriate. This is not the case, so it is a pitfall.
     
  18. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
  19. Strilanc

    Strilanc Veteran Scripter

    Ratings:
    +42 / 0 / -0
    I'm not sure if I agree with the function/action distinction being a pitfall. One returns a value and the other doesn't. It's a reasonable place to draw a line.
     
  20. SerraAvenger

    SerraAvenger Cuz I can

    Ratings:
    +236 / 0 / -0
    According to Dan: "A function of type action CAN return a value if you would like it to"

    I still stand my point. You decide what goes in, though. I have nothing to add to my argumentation right now.
     

Share This Page