Time for action ā making functions, variables, and movieclips accessible in CryENGINE 3
Let's follow a few simple steps:
In order to call our ActionScript functions and manipulate our movieclips and variables, we have to announce them in the XML file. For this, we need to add some more tags into our
<UIElement>
tag. Let's start with the<functions>
tag:<functions> <function name="SetWeapon" desc="" funcname="setCurrentWeapon"><param name="WeaponName" desc="" type="string"/> <param name="AmmoName" desc="" type="string" /> </function> <function name="SetAmmo" desc="" funcname="setAmmo"> <param name="CurrAmmo" desc="" type="int"/> <param name="MaxAmmo" desc="" type="int" /> </function> </functions>
For each function, you have to define a human-readable name and the corresponding ActionScript function name. Optionally, you can give a description that will be displayed...