1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] GUI > Jass, Globals > Locals?

Discussion in 'Triggers & Scripts' started by GRDN1014, Aug 17, 2007.

  1. GRDN1014

    GRDN1014

    Joined:
    Aug 16, 2007
    Messages:
    12
    Resources:
    0
    Resources:
    0
    So, I'm working on a custom campaign. Right now I'm just working on triggered abilities, which naturally use tons of triggers (thats fine) and variables (not fine). I understand the only way to create and set local variables is through Jass. Most of you are going to tell me "Oh, just learn Jass, its easy!" and I don't disagree, I would just rather not.

    My question is, if I finish all my triggers in GUI and get them all working (create them in one map with all global variables) can I do the "convert to code" option and just go through each trigger word by word changing all my global variables to locals?

    It would be a ton easier if I just had to copy/paste one trigger folder from map to map than triggers and variables and worry about overlapping and what if I had to change one in one map and... you get the point.

    Plus it would make the triggers nicer to my computer :wink:
     
  2. Rui

    Rui

    Joined:
    Jan 7, 2005
    Messages:
    8,497
    Resources:
    8
    Maps:
    8
    Resources:
    8
    I think you'll get better answers in the Triggers (GUI) Forum.

    ~Thread Moved
     
  3. Burningice

    Burningice

    Joined:
    Nov 9, 2006
    Messages:
    25
    Resources:
    0
    Resources:
    0
    You mean convert your GUI trigger to custom text, initialize all the local variables, and find every reference to the variable you want to convert in the function, and change it?

    Theres not really a reason to do that...
     
  4. Taur

    Taur

    Joined:
    Aug 15, 2004
    Messages:
    719
    Resources:
    5
    Models:
    3
    Maps:
    2
    Resources:
    5
    In theory you could.

    However, GUI does a funny thing with conditions, it makes them into seperate functions. You dont know JASS so I wont bore you, but that means you cant use locals in conditions without editing the code, and pasting the conditions into the main function. This can be kind of a pain if you dont know JASS, and the only real tool that does this for you is Vex's optimizer, but sometimes it is difficult getting the code back once the optimizer is done if you dont know what you're doing.

    Im sorry if this explanation seems insufficient but it would take a long time to explain all of it. My suggestion is: it's a campaign, it's not multiplayer, globals do not cause that much lag and locals can be bad if you are not used to them. Stick with the globals.