| 08-10-2004, 04:07 PM | #1 |
Hello, I was wondering if there is ANY way to use for example a Local Variable and assign it in the GUI ? I tried different methods, but nones seem to work. Can someone help me please? Thanks! (P.S. : Please, don't tell me to just use Convert my Trigger to Custom Text, I hate it ... I'm not a novice at it, but this is so unconfortable to use JASS directly!) |
| 08-10-2004, 04:21 PM | #2 |
there is a way but you can only use 1 local per trigger first, make a normal, global variable of whatever your variable should be named then, say you named your variable blah and its a an integer, use a custom script action that says local inteeger udg_blah youll then use the variable blah in the gui as a locl variable, even though its a global, like i said this can only be used once a trigger, but you could use arrays for mulitible variable by saying local integer array blah hope this helps |
| 08-10-2004, 04:27 PM | #3 |
Hmm... I tried "kinda" this method before, the problem is that it tell me that it expect a name each time that I am trying to save the map. =/ |
| 08-10-2004, 04:36 PM | #4 |
eh, where does it say it needs a name? on the custom script? and you are using TFT, right? cause im not sure if this works in RoC, but ive used it once or twice in TFT and it wokred for me |
| 08-10-2004, 04:43 PM | #5 |
Yeah, I'm using last TFT version with UMSWE ... (Except I changed/added somes stuffs in it) ... But nevermind Mythmon, I made it to work now! Also, I want to add : No, you can use as many Local Variables Arrays as you want.. There is no limit! Thank you VERY MUCH Mythmon ! Edit : Typo |
| 08-11-2004, 12:28 AM | #6 |
you can also use locals if you use the custom script for the action of the variable. Like global Unit A "Set Unit A's life to 50%" custom script: local unit Unit A = GetTriggerUnit() or w.e blah blah custom script: whatever you use to set life to 50% |
| 08-11-2004, 01:02 AM | #7 |
And just to correct (or reconfirm) you. You can only use this "trick" for one local variable/array per trigger. If you use it for two variables, they will mess up BADLY. But yes, thus you can use a array to work with multiple local variables. But then they can only be the same time. ~Cubasis |
