Moderator
M
Moderator
22:29, 6th Jul 2014
PurgeandFire: Useful.
PurgeandFire: Useful.
(2 ratings)
Your new MUI trigger
-> Events
-> Conditions
-> Actions
1. Local variables initialization //<- NEW
2. Regular code
3. Memory leaks cleanup //<- NEW
|
|
|
floatingtext // isn't highlighted
texttag // is
Was thinking about that as well, but somehow I see it more presented globally here, more people will find it here.Pretty much a good one, but ain't it's better as a tutorial with the map attached at the end? (Unless there's some exclusive codes in this system).
Pretty surprised there isn't any pseudo local 'tutorial' in Hive yet. Or is there...?
Perhaps you could mention that the pseudo local method can only work for a single global variable.
Also, pseudo locals do not really work in GUI condition block. This can easily be solved by globalising the local again.
Yeah.man, this is not a system..
uhm, I don't know so much but, is there any difference between local without and with udg_? sorry to ask here
edit:
oh, or if I get this right, you localize a global variable?
:/can only work for a single global variable.
Then you create another global variable.well, could be great if there is no limitations like
:/
local integer array udg_i
?Jass New Gen throw error, saying you can't use that name (it's already taken).how about variable with array?
if it's integer array named udg_i then, can it work withlocal integer array udg_i
?
I'm noob, so much question in my head :3
Jass New Gen throw error, saying you can't use that name (it's already taken).
You can use custom jass variable (that will be fine) but you can use this variable in GUI, like you do with udg_ variables where you click on blocks and shit.
You will need to stick with custom script in this case.
Exactly.This is really nice.. so if I use this method the variable will be locally created but you can use the variable as a normal GUI variable? (in the trigger it is created that is.)
You can't define arrays like this, compiler will throw error.This is a cool trick ^^, it will help some people get out of the trouble with JASS & GUI compiler...
Check the map below, why I can local them ? >.<
Exactly.
And you can use same variable in many triggers.
You can't define arrays like this, compiler will throw error.
Yes you can and it works here for me.I can save it without any error, i put a test map below , you can test them >.<
http://www.hiveworkshop.com/forums/spells-569/local-udg_-248534/#post2490424
Yeah it's something that is well known for several years now, but still dunno why,Deathismyfriend tutorial talk about this.
Also I truly think this belongs more to tutorial section ^^
Personally, I never had any problems with this. But I left warning just in case.So, is this recommended ? It is risky ? Will it cause desyncs ?
Personally, I never had any problems with this. But I left warning just in case.
If you want to keep things extra safe, each time you save map save it as
new one or switch between few saves. I do this mostly because problems like,
losing electric power while saving map (making map damaged in process).
Will do that.The Spells section is for spells and systems, not tutorials.
This belongs in the tutorials section of the site and you know that.
(Unless you can actually make the map nicer and bigger so that this thing is as good as Hanky's dynamic indexing shit)