I read the docs on globals, but I can’t seem to get them to work.
I have
WeaponSelect.js
enum WeaponType { SemiAuto, FullAuto };
static var SelectedWeapon = WeaponType.SemiAuto;
function Update () {
}
In another js file I try
switch(WeaponSelect.SelectedWeapon)
{
case WeaponType.SemiAuto:
ShootSemiAuto();
break;
case WeaponType.FullAuto:
ShootFullAuto();
break;
default: break;
}
But I get the errors “Unknown identifier WeaponSelect/WeaponType”.
I guess the script file isn’t being found? Anyone have any idea what the issue could be?