• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] GUI > Jass, Globals > Locals?

Status
Not open for further replies.
Level 2
Joined
Aug 16, 2007
Messages
12
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:
 
Level 2
Joined
Nov 9, 2006
Messages
25
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...
 
Level 11
Joined
Aug 15, 2004
Messages
710
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?
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.
 
Status
Not open for further replies.
Top