- Home /
Variable Scroll How do I make it Scroll
I have this coding
var meleeWeapon = false;
var rangeWeapon = false;
var skillingWeapon = false;
I want it in the Inspector have me be able to select which one by clicking on only 1 variable and scrolling down on it...
Thanks in advance for any help and i know i didn't explain well. To me this was hard to explain...
Answer by skovacs1 · Oct 08, 2010 at 06:39 PM
An enum will do the trick.
enum WeaponType { Melee, Ranged, Skilling }; //what is skilling?
var weaponType : WeaponType = WeaponType.Melee;
thanks it did the trick... and skilling is $$anonymous$$ing, smelting, crafting, etc...
I'm glad that's what you wanted. I'm pretty sure skilling isn't officially a word in any variant of English, but if it works for you and is clear to the people you work with, fair enough. It really depends on your use case, but some thoughts to consider: If it's skill equipment, is it really a weapon type? Wouldn't skill weapons fall under either category of melee or ranged?