[Stable]Hi, sorry for late reply :/, quick tutorial for local variables:
Local variable are like the variables you use, the difference is that local variables are created, used and set in an only one trigger, they are used in custom scripts
how to use:
Custom script: local integer x
This creates a local variable named "x" as an "integer" variable, it HAS to be before all the rest of the trigger, in other words, at the beginning
Custom script: set x = 1
This sets the local variable (it doesn't use udg_)
Custom script: local integer x = 1
This combines the the creation and the set of the local variable
Now, often you may need the variable for values like, level of ability, for this, it will need this set:
Custom script: set x = GetAbilitySwappedLevel(A000, GetTriggeringUnit())
This sets x to the level of the ability that has A000 as raw code (press Ctrl+D in the ability section of the editor to show the raw codes) for the Triggering Unit
Now, like me, you may not know how to do that for other things like .. The flying height, for that you have two options:
(RECOMMENDED)
Create a blank trigger, set a random variable (not local) to the value you want
Then create a custom script action and enter a random letter in it... After that, disable then enable the trigger, a popup window will show specifying that the custom script contains wrong script.. Above it.. You will see the custom script version of the value you want.. Just CnP to the trigger you are making and .. Voila..
^^ this can also be done by converting the whole trigger to custom script and CnP
(NOT RECOMMENDED)
In the main trigger, set a temp variable to the value you want and then set the local variable to the normal variable :
Custom script: local integer x
Set temp_int = (Level of Bloodlust for (Triggering Unit))
Custom script: set x = udg_temp_int
Some things you may need to know:
Variable in GUI, variable name in the Jass(custom script)
Integer, integer
Real, real
String, string
Unit, unit
Point, location
Special effect, effect
Destructible, destructable
Timer, timer
Window (of timer), timerdialog[/Stable]
Any questions?